home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / libs / smalmath.lha / SmallMath.doc < prev    next >
Encoding:
Text File  |  1992-08-19  |  3.1 KB  |  60 lines

  1.  
  2.  
  3.                 Small Math Libraries
  4.                    v. 1.0
  5.            Public domain software by Laz Marhenke
  6.  
  7.  
  8. I. Legal stuff:
  9.    These libraries are public domain. Do as you will with them (except, of
  10. course, copyright them).
  11.  
  12. II. The Software:
  13.    The enclosed libraries (mathieeesingtrans.library,
  14. mathieeedoubbas.library, and mathieeedoubtrans.library) are replacements
  15. for the IEEE math libraries that come with the Amiga for users who have a
  16. math coprocessor (68881, 68882, or 68040) installed in their system. They
  17. should be "plug-compatible"; i.e., just copy them into your LIBS: drawer
  18. and go. Unlike the originals, however, these libraries will *not* work if
  19. you don't have a math coprocessor -- they will, in fact, certainly crash
  20. your machine. The advantage to using these libraries over the
  21. Commodore-supplied ones is that these are 60-90% smaller. The space savings
  22. was realized by not including any code in the libraries for use when a
  23. coprocessor is not available. Note that these libraries are no faster than
  24. the Commodore libraries (which already make use of a coprocessor when one
  25. is available), just smaller (but see below).
  26.    To install the libraries, execute the included script "Install_Libs"
  27. (using "execute" from a shell window or by double-clicking on the icon from
  28. the Workbench). The script will copy the small math libraries into your
  29. LIBS: drawer, overwriting the old versions. (For this reason, make sure you
  30. are working with a copy of your Workbench disk.) Alternately, you can just
  31. copy them manually by whatever method you like.
  32.  
  33. III. Bugs (Features?):
  34.    There are no bugs that I have found with my testing, but there could be
  35. an incompatibility. The Pow() function in the transcendental libraries did
  36. not behave well (to my mind) when given unusual input. By "unusual", I mean
  37. things like negative numbers to infinite powers, or positive infinity to
  38. the zero power, etc. The most common response of the routine was to return
  39. zero -- in many of these cases the wrong answer. However, in at least one
  40. case (I think it was raising a negative number to the negative infinity
  41. power), the Commodore-supplied routine simply crashed. I decided that this
  42. was unacceptable, and so did not reproduce this behavior in my libraries.
  43. The Pow() function I wrote tries its best to return a reasonable number
  44. given unreasonable inputs (a positive number to the negative infinity power
  45. should be zero, for example). When no reasonable answer is possible
  46. (-4^0.5, for example), it returns NaN (not-a-number). Somehow, in doing
  47. this, I managed to write a Pow() routine which is about twice as fast as
  48. the one in the original libraries. Naturally this made me suspicious that I
  49. had missed something, but I've tested the function with every combination
  50. of inputs that I can come up with and it works fine.
  51.    I have taken the liberty of making these libraries version 37.0, since
  52. as far as I can tell, they contain all the functions that the v.37
  53. libraries do.
  54.    With any other bugs or problems, you can contact me via e-mail at
  55. lazarus@deeptht.armory.com . (My physical address varies slightly more
  56. rapidly than my e-mail address.)
  57.  
  58.  
  59.  
  60.