On 2006-02-17, Jay Ts <[EMAIL PROTECTED]> wrote:
> Ton van Overbeek wrote:
>> You would also have to port MathLib to long double.
>
> I have looked into this issue too, and the limitation of
> MathLib to just floats was the main thing that for now
> keeps me from supporting long double in my application.
> (The other thing is that although double precision is
> nice, I'm not sure anyone really needs it.)
>
> If anyone else is interested, I'd be willing to help
> develop a new freely-available (Open Source) math library
> that supports the long double data type.  Hopefully if
> we have a number of developers working together on it,
> it will not be really difficult or take a lot of time.
>
> I was thinking I'd just do it myself, using MathLib as
> an example, but it seems to be developed under CodeWarrior,
> and I am using PODS.  It is also a little complicated to
> work with the FSF's code.
>
> Jay Ts

MathLib is not using C floats (32 bit, single precision) but C double (64 
bit double precision).
MathLib itself is derived from Sun's fdlibm available from netlib:
http://www.netlib.org/fdlibm. Fdlibm has a more liberal license than LGPL.

But you will need to find a source specifically for long double (96 bits 
extended precision). All tables, constants etc in fdlibm are optimized for 
IEEE-754 double precision (64 bits).

Also have a look at the cephes library (also available at netlib)
with support for various length precisions (including 128-bit).
Note again, that on Palm you need to do this in SW, unless you are talking 
about native ARM implementation.

Ton van Overbeek
P.S. Curious why you need that kind of precision.

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to