ieeespabs() float ( float parm ); Take absolute value of IEEE single-precision variable. ieeespadd() float ieeespadd( float leftparm, float rightparm); Add two IEEE single-precision variables. ieeespceil() float ieeespceil( float parm ); Compute least integer greater than or equal to variable. ieeespcmp() long ieeespcmp( float leftparm, float rightparm ); Compare two IEEE single-precision variables. ieeespdiv() float ieeespdiv( float dividend, float divisor ); Divide two IEEE single-precision variables. ieeespfix() long ieeespfix( float parm ); Convert IEEE single-precision variable to integer. ieeespfloor() float ieeespfloor( float parm ); Compute largest integer less than or equal to variable. ieeespflt() float ieeespflt( long integer ); Convert integer variable to IEEE single-precision. ieeespmul() float ieeespmul( float leftparm, float rightparm ); Multiply two IEEE single-precision variables. ieeespneg() float ieeespneg( float parm ); Take two's complement of IEEE single-precision variable. ieeespsub() float ieeespsub( float leftparm, float rightparm ); Subtract two IEEE single-precision variables. ieeesptst() long ieeesptst( float parm ); Test an IEEE single-precision variable against zero. Be sure to include proper data type definitions, as shown in the example below. mathieeesingbas.c The Amiga assembly language interface to the IEEE single-precision basic math routines is shown below, including some details about how the system flags are affected by each operation. Note that the access mechanism from assembly language is as shown below: MOVEA.L _MathIeeeSingBasBase,A6 JSR _LVOIEEESPFix(A6) _________________________________________________________________________ | | | SP IEEE Basic Assembly Functions | | | | Function Input Output Condition Codes| |_________________________________________________________________________| | | | | | | _LVOIEEESPFix | D0=IEEE arg | D0=Integer | N=undefined | | | double-precision | (two's complement) | Z=undefined | | | | | V=undefined | | | | | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPFlt | D0=Integer arg | D0=IEEE | N=undefined | | | (two's | single-precision | Z=undefined | | | complement) | | V=undefined | | | | | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPCmp | D0=IEEE arg1 | D0=+1 if arg1>arg2 | N=1 if result | | | single-precision | D0=-1 if arg1<arg2 | is negative | | | D1=IEEE arg2 | D0=0 if arg1=arg2 | Z=1 if result | | | single-precision | | is zero | | | | | V=0 | | | | | C=undefined | | | | | X=undefined | | | | | GT=arg2>arg1 | | | | | GE=arg2>=arg1 | | | | | EQ=arg2=arg1 | | | | | NE=arg2<>arg1 | | | | | LT=arg2<arg1 | | | | | E= arg2<=arg1 | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPTst | D0=IEEE arg | D0=+1 if arg>0.0 | N=1 if result | | | single-precision | D0=-1 if arg<0.0 | is negative | | | | D0=0 if arg=0.0 | Z=1 if result | | | | | is zero | | | | | V=0 | | | | | C=undefined | | | | | X=undefined | | | | | EQ=arg=0.0 | | | | | NE=arg<>0.0 | | | | | PL=arg>=0.0 | | | | | MI=arg<0.0 | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPAbs | D0=IEEE arg | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | | absolute value | V=undefined | | | | | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPNeg | D0=IEEE arg | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | | negated | V=undefined | | | | | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPAdd | D0=IEEE arg1 | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | D1=IEEE arg2 | addition of | V=undefined | | | single-precision | arg1+arg2 | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPSub | D0=IEEE arg1 | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | D1=IEEE arg2 | subtraction of | V=undefined | | | single-precision | arg1-arg2 | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPMul | D0=IEEE arg1 | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | D1=IEEE arg2 | multiplication of | V=undefined | | | single-precision | arg1*arg2 | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPDiv | D0=IEEE arg1 | D0=IEEE | N=undefined | | | single-precision | single-precision | Z=undefined | | | D1=IEEE arg2 | division of | V=undefined | | | single-precision | arg1/arg2 | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPCeil | D0=IEEE variable | D0=least integer | N=undefined | | | single-precision | >= variable | Z=undefined | | | | | V=undefined | | | | | C=undefined | | | | | X=undefined | |-----------------|------------------|--------------------|---------------| | _LVOIEEESPFloor | D0=IEEE variable | D0=largest integer | N=undefined | | | single-precision | <= arg | Z=undefined | | | | | V=undefined | | | | | C=undefined | | | | | X=undefined | |_________________|__________________|____________________|_______________|