@database "mathffp"
@master "ADCD_v1.2:IncludesD/Inc&AD1.3/doc/mathffp.doc"

@Node Main "mathffp.doc"
@TOC 1.3Includes_Autodocs/Autodocs

@{" SPAbs() " Link "SPAbs()"}     @{" SPCmp() " Link "SPCmp()"}    @{" SPFloor() " Link "SPFloor()"}    @{" SPNeg() " Link "SPNeg()"}
@{" SPAdd() " Link "SPAdd()"}     @{" SPDiv() " Link "SPDiv()"}    @{" SPFlt() " Link "SPFlt()"}      @{" SPSub() " Link "SPSub()"}
@{" SPCeil() " Link "SPCeil()"}    @{" SPFix() " Link "SPFix()"}    @{" SPMul() " Link "SPMul()"}      @{" SPTst() " Link "SPTst()"}

@EndNode

@Node "SPAbs()" "mathffp.library/SPAbs"

NAME
    SPAbs - obtain the absolute value of the fast floating point number

C USAGE
    fnum2 = SPAbs(fnum1);
                    d0

FUNCTION
    Accepts a floating point number and returns the absolute value of
    said number.

INPUTS
    fnum1 - floating point number

RESULT
    fnum2 - floating point absolute value of fnum1

BUGS
    None

SEE ALSO
    _LVOSPAbs, abs

@EndNode

@Node "SPAdd()" "mathffp.library/SPAdd"

NAME
    SPAdd - add two floating point numbers

C USAGE
    fnum3 = SPAdd(fnum1, fnum2);
                    d1      d0

FUNCTION
    Accepts two floating point numbers and returns the arithmetic
    sum of said numbers.

INPUTS
    fnum1 - floating point number
    fnum2 - floating point number

RESULT
    fnum3 - floating point number

BUGS
    None

SEE ALSO
    _LVOSPAdd, faddi

@EndNode

@Node "SPCeil()" "mathffp.library/SPCeil"

NAME
    SPCeil -- compute Ceil function of a number

SYNOPSIS
      x   = SPCeil(  y  );
     d0              d0

    float   x,y;

FUNCTION
    Calculate the least integer greater than or equal to x and return it.
    This identity is true.  Ceil(x) = -Floor(-x).

INPUTS
    y -- Motorola Fast Floating @{"Point" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuitionbase.h/Main" 88} Format Number

RESULT
    x -- Motorola Fast Floating @{"Point" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuitionbase.h/Main" 88} Format Number

BUGS

SEE ALSO
    @{"SPFloor" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/mathffp/SPFloor()"}

@EndNode

@Node "SPCmp()" "mathffp.library/SPCmp"

NAME
    SPCmp - compares two floating point numbers and sets
                    appropriate condition codes

C USAGE
    if (SPCmp(fnum1, fnum2)) {...}
                d1    d0

FUNCTION
    Accepts two floating point numbers and returns the condition
    codes set to indicate the result of said comparison.  Additionally,
    the integer functional result is returned to indicate the result
    of said comparison.

INPUTS
    fnum1 - floating point number
    fnum2 - floating point number

RESULT
    Condition codes set to reflect the following branches:

            GT - fnum2 >  fnum1
            GE - fnum2 >= fnum1
            EQ - fnum2 =  fnum1
            NE - fnum2 != fnum1
            LT - fnum2 <  fnum1
            LE - fnum2 <= fnum1

    Integer functional result as:

            +1 => fnum1 > fnum2
            -1 => fnum1 < fnum2
             0 => fnum1 = fnum2

BUGS
    None

SEE ALSO
    _LVOSPCmp, fcmpi

@EndNode

@Node "SPDiv()" "mathffp.library/SPDiv"

NAME
    SPDiv - divide two floating point numbers

C USAGE
    fnum3 = SPDiv(fnum1, fnum2);
                    d1     d0

FUNCTION
    Accepts two floating point numbers and returns the arithmetic
    division of said numbers.

INPUTS
    fnum1 - floating point number
    fnum2 - floating point number

RESULT
    fnum3 - floating point number

BUGS
    None

SEE ALSO
    _LVOSPDiv, fdivi

@EndNode

@Node "SPFix()" "mathffp.library/SPFix"

NAME
    SPFix - convert fast floating point number to integer

C USAGE
    inum = SPFix(fnum);
                  d0

FUNCTION
    Accepts a floating point number and returns the truncated
    integer portion of said number.

INPUTS
    fnum - floating point number

RESULT
    inum - signed integer number

BUGS
    None

SEE ALSO
    _LVOSPFix, ffixi

@EndNode

@Node "SPFloor()" "mathffp.library/SPFloor"

NAME
    SPFloor -- compute Floor function of a number

SYNOPSIS
      x   = SPFloor(  y  );
      d0              d0

    float   x,y;

FUNCTION
    Calculate the largest integer less than or equal to x and return it.

INPUTS
    y -- Motorola Fast Floating @{"Point" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuitionbase.h/Main" 88} number

RESULT
    x -- Motorola Fast Floating @{"Point" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuitionbase.h/Main" 88} number

BUGS

SEE ALSO
    @{"SPCeil" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/mathffp/SPCeil()"}

@EndNode

@Node "SPFlt()" "mathffp.library/SPFlt"

NAME
    SPFlt - convert integer number to fast floating point

C USAGE
    fnum = SPFlt(inum);
                  d0

FUNCTION
    Accepts an integer and returns the converted
    floating point result of said number.

INPUTS
    inum - signed integer number

RESULT
    fnum - floating point number

BUGS
    None

SEE ALSO
    _LVOSPFlt, fflti

@EndNode

@Node "SPMul()" "mathffp.library/SPMul"

NAME
    SPMul - multiply two floating point numbers

C USAGE
    fnum3 = SPMul(fnum1, fnum2);
                    d1     d0

FUNCTION
    Accepts two floating point numbers and returns the arithmetic
    multiplication of said numbers.

INPUTS
    fnum1 - floating point number
    fnum2 - floating point number

RESULT
    fnum3 - floating point number

BUGS
    None

SEE ALSO
    _LVOSPMul, fmuli

@EndNode

@Node "SPNeg()" "mathffp.library/SPNeg"

NAME
    SPNeg - negate the supplied floating point number

C USAGE
    fnum2 = SPNeg(fnum1);
                    d0

FUNCTION
    Accepts a floating point number and returns the value
    of said number after having been subtracted from 0.0

INPUTS
    fnum1 - floating point number

RESULT
    fnum2 - floating point negation of fnum1

BUGS
    None

SEE ALSO
    _LVOSPNeg, fnegi

@EndNode

@Node "SPSub()" "mathffp.library/SPSub"

NAME
    SPSub - subtract two floating point numbers

C USAGE
    fnum3 = SPSub(fnum1, fnum2);
                    d1      d0

FUNCTION
    Accepts two floating point numbers and returns the arithmetic
    subtraction of said numbers.

INPUTS
    fnum1 - floating point number
    fnum2 - floating point number

RESULT
    fnum3 - floating point number

BUGS
    None

SEE ALSO
    _LVOSPSub, fsubi

@EndNode

@Node "SPTst()" "mathffp.library/SPTst"

NAME
    SPTst - compares a fast floating point number against the
                    value zero (0.0) and sets the appropriate
                    condition codes

C USAGE
    if (!(SPTst(fnum))) {...}
                 d1

FUNCTION
    Accepts a floating point number and returns the condition
    codes set to indicate the result of a comparison against
    the value of zero (0.0).  Additionally, the integer functional
    result is returned.

INPUTS
    fnum - floating point number

RESULT
    Condition codes set to reflect the following branches:

            EQ - fnum =  0.0
            NE - fnum != 0.0
            PL - fnum >= 0.0
            MI - fnum <  0.0

    Integer functional result as:

            +1 => fnum > 0.0
            -1 => fnum < 0.0
             0 => fnum = 0.0

BUGS
    None

SEE ALSO
    _LVOSPTst, ftsti

@EndNode

