BM> Does anyone have any good code for calculating some of the
ranscendental
BM> functions (exp, sin, cos would be enough... I already
BM> know how I can do ln and
BM> atan2, and the various hyperbolic and inverse functions
BM> can be derived from
BM> those five) using only 8087 instructions (no library calls, no emulator
BM> shortcuts, and no 387 FCOS/FSIN instructions)?
You're talking about "approximation theory." Despite textbooks and manuals
which will tell you, incorrectly, that these functions are calculated by
Taylor's theorem, they are in fact calculated by "approximation functions"
which are usually fitted polynomials. A good source is Cody and Waite's 1980
book (forget the title just at the moment). Also Kenneth Plauger's "The C
Standard Library." I have approximation algorithms from these, but they're
all in QBASIC -- I have no idea how I'd implement them in assembler.
--- Maximus 2.02
---------------
* Origin: Politically Incorrect (412) 766-0743 (1:129/283)
|