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