Re: Numerics question: reading floating point constants

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Numerics question: reading floating point constants

Nicolas Cellier-3
Le Dimanche 09 Avril 2006 18:23, stéphane ducasse a écrit :
> Do you know a good book or lectures on the problems related to number
> representation in our nice
> computers?
>
> Stef
>

Some more links:

function doing the conversion in C is strtod.
glib implementation use mulitple precision integer arithmetic (mp library).

Google: strtod source documentation
http://www.jhauser.us/arithmetic/SoftFloat.html

This guy has also a TestFloat program written in C for testing conversions
Maybe we can borrow some tests and port in SUnit


Google: Sun Microsystems' Numerical Computation Guide
 http://docs.sun.com/source/806-3568/

Good doc i learned with is available on the net...

Google: IEEE 754 standard
http://en.wikipedia.org/wiki/IEEE_754

Sort introduction. Following the links you will find the two above...

I started programming algorithm M, R and Bellerophon from tony's ref.
But it does not handle denormalized (gradual underflow) nor possible overflow
(Infinity). Deserve some more work...
It does involve LargeInteger arithmetic anyway because of 52+1 bit
significand... (Bellerophon use 64 bits). But performance seem not degraded
vs current implementation (i do not test parsing so far, only the conversion
part).

Nicolas