[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Integer Calculation
From: |
Paul Kienzle |
Subject: |
Re: Integer Calculation |
Date: |
Wed, 26 Jun 2002 11:40:32 -0400 |
Try:
fix(2/3)
fix(4/3)
rem(0xffff+1,0x10000)
rem(0xffff+1,0x100000000)
Paul Kienzle
address@hidden
On Wed, Jun 26, 2002 at 10:09:40AM -0500, address@hidden wrote:
> Hi !
>
> I try to use Octave to simulate a velocity controller.
> This controller software normaly runs on a 68040 based
> board.
> The controller made use of 16Bit and 32Bit values
> wich can be signed or unsigned.
>
> So when I try to simulate the velocity controller
> I have the problem that Octave can't handle 16/32Bit Integer
> arithmetik.
>
> Examples (what I need):
> 2/3 = 0
> 4/3 = 1
> 0xffff + 1 = 0 ! (16Bit Value)
> 0x0000ffff + 1 = 0x00010000 ! (32Bit Value)
>
> So for some variables I didn't want to use a float value !!
>
> Or is it impossible because every variable inside octave is a flot
> value ?
>
> Thanks
>
> Wolfgang
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------