home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / mathffp.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  6.2 KB  |  425 lines

  1. TABLE OF CONTENTS
  2.  
  3. mathffp.library/SPAbs
  4. mathffp.library/SPAdd
  5. mathffp.library/SPCeil
  6. mathffp.library/SPCmp
  7. mathffp.library/SPDiv
  8. mathffp.library/SPFix
  9. mathffp.library/SPFloor
  10. mathffp.library/SPFlt
  11. mathffp.library/SPMul
  12. mathffp.library/SPNeg
  13. mathffp.library/SPSub
  14. mathffp.library/SPTst
  15.  
  16.  
  17. mathffp.library/SPAbs                                     mathffp.library/SPAbs
  18.  
  19. NAME    
  20.  
  21.     SPAbs - obtain the absolute value of the fast floating point number
  22.  
  23. C USAGE
  24.  
  25.     fnum2 = SPAbs(fnum1);
  26.             d0
  27.  
  28. FUNCTION
  29.  
  30.     Accepts a floating point number and returns the absolute value of
  31.     said number.
  32.  
  33. INPUTS
  34.  
  35.     fnum1 - floating point number
  36.  
  37. RESULT
  38.  
  39.     fnum2 - floating point absolute value of fnum1
  40.  
  41. BUGS
  42.  
  43.     None
  44.  
  45. SEE ALSO
  46.  
  47.     _LVOSPAbs, abs
  48.  
  49. mathffp.library/SPAdd                                     mathffp.library/SPAdd
  50.  
  51. NAME    
  52.  
  53.     SPAdd - add two floating point numbers
  54.  
  55. C USAGE
  56.  
  57.     fnum3 = SPAdd(fnum1, fnum2);
  58.             d1    d0
  59.  
  60. FUNCTION
  61.  
  62.     Accepts two floating point numbers and returns the arithmetic
  63.     sum of said numbers.
  64.  
  65. INPUTS
  66.  
  67.     fnum1 - floating point number
  68.     fnum2 - floating point number
  69.  
  70. RESULT
  71.  
  72.     fnum3 - floating point number
  73.  
  74. BUGS
  75.  
  76.     None
  77.  
  78. SEE ALSO
  79.  
  80.     _LVOSPAdd, faddi
  81.  
  82. mathffp.library/SPCeil                                   mathffp.library/SPCeil
  83.  
  84.    NAME
  85.     SPCeil -- compute Ceil function of a number
  86.  
  87.    SYNOPSIS
  88.       x   = SPCeil(  y  );
  89.      d0         d0
  90.  
  91.     float    x,y;
  92.  
  93.    FUNCTION
  94.     Calculate the least integer greater than or equal to x and return it.
  95.     This identity is true.  Ceil(x) = -Floor(-x).
  96.  
  97.    INPUTS
  98.     y -- Motorola Fast Floating Point Format Number
  99.  
  100.    RESULT
  101.     x -- Motorola Fast Floating Point Format Number
  102.  
  103.    BUGS
  104.  
  105.    SEE ALSO
  106.     SPFloor
  107.  
  108. mathffp.library/SPCmp                                     mathffp.library/SPCmp
  109.  
  110. NAME    
  111.  
  112.     SPCmp - compares two floating point numbers and sets
  113.             appropriate condition codes
  114.  
  115. C USAGE
  116.  
  117.     if (SPCmp(fnum1, fnum2)) {...}
  118.             d1      d0
  119.  
  120. FUNCTION
  121.  
  122.     Accepts two floating point numbers and returns the condition
  123.     codes set to indicate the result of said comparison.  Additionally,
  124.     the integer functional result is returned to indicate the result
  125.     of said comparison.
  126.  
  127. INPUTS
  128.  
  129.     fnum1 - floating point number
  130.     fnum2 - floating point number
  131.  
  132. RESULT
  133.  
  134.     Condition codes set to reflect the following branches:
  135.  
  136.         GT - fnum2 >  fnum1
  137.         GE - fnum2 >= fnum1
  138.         EQ - fnum2 =  fnum1
  139.         NE - fnum2 != fnum1
  140.         LT - fnum2 <  fnum1
  141.         LE - fnum2 <= fnum1
  142.  
  143.     Integer functional result as:
  144.  
  145.         +1 => fnum1 > fnum2
  146.         -1 => fnum1 < fnum2
  147.          0 => fnum1 = fnum2
  148.  
  149. BUGS
  150.  
  151.     None
  152.  
  153. SEE ALSO
  154.  
  155.     _LVOSPCmp, fcmpi
  156.  
  157. mathffp.library/SPDiv                                     mathffp.library/SPDiv
  158.  
  159. NAME    
  160.  
  161.     SPDiv - divide two floating point numbers
  162.  
  163. C USAGE
  164.  
  165.     fnum3 = SPDiv(fnum1, fnum2);
  166.             d1     d0
  167.  
  168. FUNCTION
  169.  
  170.     Accepts two floating point numbers and returns the arithmetic
  171.     division of said numbers.
  172.  
  173. INPUTS
  174.  
  175.     fnum1 - floating point number
  176.     fnum2 - floating point number
  177.  
  178. RESULT
  179.  
  180.     fnum3 - floating point number
  181.  
  182. BUGS
  183.  
  184.     None
  185.  
  186. SEE ALSO
  187.  
  188.     _LVOSPDiv, fdivi
  189.  
  190. mathffp.library/SPFix                                     mathffp.library/SPFix
  191.  
  192. NAME    
  193.  
  194.     SPFix - convert fast floating point number to integer
  195.  
  196. C USAGE
  197.  
  198.     inum = SPFix(fnum);
  199.               d0
  200.  
  201. FUNCTION
  202.  
  203.     Accepts a floating point number and returns the truncated
  204.     integer portion of said number.
  205.  
  206. INPUTS
  207.  
  208.     fnum - floating point number
  209.  
  210. RESULT
  211.  
  212.     inum - signed integer number
  213.  
  214. BUGS
  215.  
  216.     None
  217.  
  218. SEE ALSO
  219.  
  220.     _LVOSPFix, ffixi
  221.  
  222. mathffp.library/SPFloor                                 mathffp.library/SPFloor
  223.  
  224.    NAME
  225.     SPFloor -- compute Floor function of a number
  226.  
  227.    SYNOPSIS
  228.       x   = SPFloor(  y  );
  229.       d0          d0
  230.  
  231.     float    x,y;
  232.  
  233.    FUNCTION
  234.     Calculate the largest integer less than or equal to x and return it.
  235.  
  236.    INPUTS
  237.     y -- Motorola Fast Floating Point number
  238.  
  239.    RESULT
  240.     x -- Motorola Fast Floating Point number
  241.  
  242.    BUGS
  243.  
  244.    SEE ALSO
  245.     SPCeil
  246.  
  247. mathffp.library/SPFlt                                     mathffp.library/SPFlt
  248.  
  249. NAME    
  250.  
  251.     SPFlt - convert integer number to fast floating point
  252.  
  253.  
  254. C USAGE
  255.  
  256.     fnum = SPFlt(inum);
  257.               d0
  258.  
  259. FUNCTION
  260.  
  261.     Accepts an integer and returns the converted
  262.     floating point result of said number.
  263.  
  264. INPUTS
  265.  
  266.     inum - signed integer number
  267.  
  268. RESULT
  269.  
  270.     fnum - floating point number
  271.  
  272. BUGS
  273.  
  274.     None
  275.  
  276. SEE ALSO
  277.  
  278.     _LVOSPFlt, fflti
  279.  
  280. mathffp.library/SPMul                                     mathffp.library/SPMul
  281.  
  282. NAME    
  283.  
  284.     SPMul - multiply two floating point numbers
  285.  
  286. C USAGE
  287.  
  288.     fnum3 = SPMul(fnum1, fnum2);
  289.             d1     d0
  290.  
  291. FUNCTION
  292.  
  293.     Accepts two floating point numbers and returns the arithmetic
  294.     multiplication of said numbers.
  295.  
  296. INPUTS
  297.  
  298.     fnum1 - floating point number
  299.     fnum2 - floating point number
  300.  
  301. RESULT
  302.  
  303.     fnum3 - floating point number
  304.  
  305. BUGS
  306.  
  307.     None
  308.  
  309. SEE ALSO
  310.  
  311.     _LVOSPMul, fmuli
  312.  
  313. mathffp.library/SPNeg                                     mathffp.library/SPNeg
  314.  
  315. NAME    
  316.  
  317.     SPNeg - negate the supplied floating point number
  318.  
  319. C USAGE
  320.  
  321.     fnum2 = SPNeg(fnum1);
  322.             d0
  323.  
  324. FUNCTION
  325.  
  326.     Accepts a floating point number and returns the value
  327.     of said number after having been subtracted from 0.0
  328.  
  329. INPUTS
  330.  
  331.     fnum1 - floating point number
  332.  
  333. RESULT
  334.  
  335.     fnum2 - floating point negation of fnum1
  336.  
  337. BUGS
  338.  
  339.     None
  340.  
  341. SEE ALSO
  342.  
  343.     _LVOSPNeg, fnegi
  344.  
  345. mathffp.library/SPSub                                     mathffp.library/SPSub
  346.  
  347. NAME    
  348.  
  349.     SPSub - subtract two floating point numbers
  350.  
  351. C USAGE
  352.  
  353.     fnum3 = SPSub(fnum1, fnum2);
  354.             d1    d0
  355.  
  356. FUNCTION
  357.  
  358.     Accepts two floating point numbers and returns the arithmetic
  359.     subtraction of said numbers.
  360.  
  361. INPUTS
  362.  
  363.     fnum1 - floating point number
  364.     fnum2 - floating point number
  365.  
  366. RESULT
  367.  
  368.     fnum3 - floating point number
  369.  
  370. BUGS
  371.  
  372.     None
  373.  
  374. SEE ALSO
  375.  
  376.     _LVOSPSub, fsubi
  377.  
  378. mathffp.library/SPTst                                     mathffp.library/SPTst
  379.  
  380. NAME    
  381.  
  382.     SPTst - compares a fast floating point number against the
  383.             value zero (0.0) and sets the appropriate
  384.             condition codes
  385.  
  386. C USAGE
  387.  
  388.     if (!(SPTst(fnum))) {...}
  389.              d1
  390.  
  391. FUNCTION
  392.  
  393.     Accepts a floating point number and returns the condition
  394.     codes set to indicate the result of a comparison against
  395.     the value of zero (0.0).  Additionally, the integer functional
  396.     result is returned.
  397.  
  398. INPUTS
  399.  
  400.     fnum - floating point number
  401.  
  402. RESULT
  403.  
  404.     Condition codes set to reflect the following branches:
  405.  
  406.         EQ - fnum =  0.0
  407.         NE - fnum != 0.0
  408.         PL - fnum >= 0.0
  409.         MI - fnum <  0.0
  410.  
  411.     Integer functional result as:
  412.  
  413.         +1 => fnum > 0.0
  414.         -1 => fnum < 0.0
  415.          0 => fnum = 0.0
  416.  
  417. BUGS
  418.  
  419.     None
  420.  
  421. SEE ALSO
  422.  
  423.     _LVOSPTst, ftsti
  424.  
  425.