|Amiga Research OS|
AROS - The Amiga Research OS
- #include <libraries/mathffp.h>
float SPFlt ()
- LONG inum
- Signed integer to convert
- FFP number
zero : result is zero
negative : result is negative
overflow : ffp is not exactly the integer
- SEE ALSO
- Return zero for x == 0.
If x < 0 set the sign-bit and calculate the absolute value
Find out which bit is the highest-set bit. If the number
of that bit > 24 then the result has the highest bit
of the mantisse set to one and the exponent equals the
number of the bit + 2. This is due to the fact that we only
have 24 bits for the mantisse.
Otherwise rotate the given integer by
(32 - (number of highes set bit + 1)) bits to the left and
calculate the result from that.
Amiga® is a trademark of Amiga Inc. All other trademarks belong to their respective owners.
Copyright © AROS - The Amiga Research OS
All Rights Reserved
Comments to webmaster: email@example.com
Generated: Tue Sep 4, 2001