home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / libsrc87 / readme.fp < prev    next >
Encoding:
Text File  |  1993-07-30  |  2.9 KB  |  56 lines

  1. This kit contains a set of floating point routines for use with gcc on a
  2. native 68000 processor. Both single and double floats are implemented. The
  3. kit is a port of a floating point package for 80x86 processors, originally
  4. written by Peter S. Housel for the minix-pc c compiler. Some 68000 specific
  5. optimizations have been done during the port, f.i. i tried to do almost every-
  6. thing in the 68000 register set, and shifts are reduced by swapping register
  7. halfs whereever possible (shifting is expensive on a plain 68000). However,
  8. please note that the whole package is not a speed daemon. Especially the
  9. single float procedures are *slow* - i haven't put much effort in this part,
  10. for example more things could be done in registers here.
  11.  
  12. As an addition to the original packet this one supports denormalized numbers
  13. as demanded by IEEE. For those of you not familar with the concept of denor-
  14. malized number here is a short description :
  15.  
  16. Due to the implied '1' bit at the top position of normalized numbers there is
  17. a gap between zero and the first normalized number:
  18.    0                                          =>1
  19.    I       IIIIIII I I I I   I   I       I
  20.     <-gap->
  21. The effect of this is the result of calculations with very small numbers tend
  22. to be zero ("flush to zero" effect). To avoid this IEEE 754 demands a special
  23. format for numbers in that gap, called "denormalized numbers". Denormalized
  24. numbers have the smallest possible binary exponent (-1022) but have an implied
  25. zero bit at the top position of the mantissa rather then a '1' bit, giving
  26. you more bits (52 or 23) for filling the gap :
  27.    0                                          =>1
  28.    IIIIIIIIIIIIIII I I I I   I   I       I
  29.     <----->
  30.     denormalized
  31.     numbers
  32. Normalized numbers have a binary exponent ranging from 0x001 to 0x3fe (0x0fe
  33. for single floats). The exponent value 0x3ff (0xff) is used to represent NaN's
  34. and infinity. The value 0x000 represents a denormalized number. Note carefully
  35. that the exponent values 0x000 and 0x001 describe the same binary exponent
  36. value, -1022, but the implied bit on the mantissa top has another value.
  37. The "special" number zero is represented by a 0x000 exponent and a zero
  38. mantissa; note that IEEE explicitly allows 0.0 to have a sign.
  39.  
  40. NaN's, infinities and signed zero values are not supported by the routines in
  41. this kit; that's left as an exercise to the reader 8-) (should not be too
  42. difficult, just time consuming).
  43.  
  44. For a description of the implementation of the routines in detail, see the
  45. NOTES files in P.Housels original posting to comp.os.minix; he has also a
  46. fairly good list of literature references on this theme.
  47.  
  48. Since there's always another bug, mail me if you have found one. I'll try
  49. to get bugs corrected (well, as far as my time allows that 8-).
  50.  
  51. Enjoy,
  52. -Kai-Uwe Bloem-        I5110401@DBSTU1.BITNET        (will change RSN)
  53.   Europe:        ...!unido!dbstu1.bitnet!i5110401
  54.   US:            ...!cornellc.ccs.cornell.edu!dbstu1.bitnet!i5110401
  55.             I5110401%DBSTU1.BITNET@cornellc.ccs.cornell.edu
  56.