Decimal floating point Message #1 Posted by Thomas Okken on 14 Feb 2006, 5:52 p.m.
I just started work on adding support for decimal floating point to Free42. I'm getting close to the point where I can hook an actual decimal library into the code, and I'm now on the lookout for the best code to use.
Hugh Steers kindly gave me a copy of the decimal code he wrote for OpenRPN, and I may decide to use that code eventually - it has an unrestrictive license and it's fast, but because of its encoding scheme it is not very memory-efficient, and at present it still lacks a few functions I need (hyperbolics, gamma, ln(1+x), exp(x)-1).
So, does anyone know of any other options? The IBM decNumber code has licensing restrictions I'm not sure I'm prepared to live with... Something that implements IEEE-754R (including "extended", preferably) and comes under a nice BSD-ish license would be perfect, but I guess that may be a bit much to hope for...
(One cute benefit of the Free42 code restructuring is that I'm going to support the use of extra-wide numbers internally (for complex and matrix computations), so on platforms where "long double" really is longer than plain "double", you'll get some pretty decent accuracy when stress testing INVRT with Hilbert matrices and such... Something to keep fans of binary happy. If they're using Linux, anyway -- VC++ 6.0 does not support "long double" so unless I switch to different development software, the 80-bit capability of your PC's FPU will continue to sit idle. And PalmOS (or rather, MathLib) won't do long double, period. Oh, well, enough rambling.)
- Thomas
Edited: 14 Feb 2006, 6:26 p.m.
|