AROSAmiga Research OS

Previous Next Top of Manual blank.gif

AROS - The Amiga Research OS


Documentation
    AutoDocs
        Exec.library
        MathFFP.library
            SPAdd
            SPCmp
            SPMul
            SPAbs
            SPCeil
            SPDiv
            SPNeg
            SPTst
            SPFloor
            SPFix
            SPSub
            SPFlt
        MathIEEEDoubleBase
        MathIEEEDoubleTrans
        MathIEEESingleBase
        MathIEEESingleTrans
        MathTrans
NAME
#include <libraries/mathffp.h>
#include <proto/mathffp.h>

float SPFlt ()

SYNOPSIS
LONG inum

FUNCTION
INPUTS
inum
Signed integer to convert

RESULT
FFP number Flags: zero : result is zero negative : result is negative overflow : ffp is not exactly the integer
NOTES
EXAMPLE

BUGS
SEE ALSO
MathFFP.library

INTERNALS
Return zero for x == 0.

If x < 0 set the sign-bit and calculate the absolute value of x.

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.


Previous Next Top of Manual blank.gif
minilogo.gif

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: digulla@aros.org
Generated: Tue Sep 4, 2001