[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Integer Calculation

**From**: |
w . gertzen |

**Subject**: |
Integer Calculation |

**Date**: |
Wed, 26 Jun 2002 10:09:40 -0500 |

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
-------------------------------------------------------------

**Integer Calculation**,
*w . gertzen* **<=**