Russ Whitaker wrote:
On Wed, 4 Apr 2001, Frank Heckenbach wrote:
Russ Whitaker wrote:
glibc-2.1.3 lists support for 3 floating-point types:
DoubleWord ( 64 bits ) TripleWord ( 96 bits ) QuadWord (128 bits )
Really? This must be software emulation then, since (on IA32 and many other processors), only the last one is supported by the FP hardware.
Where did you find out about it (didn't see it on a quick glance in the manual)?
Don't remember *exactly* where I saw it, but here's two excerpts that should do the trick:
All mathematical functions which take a floating-point argument have three variants, one each for `double', `float', and `long double' arguments. The `double' versions are mostly defined in ISO C 89. The `float' and `long double' versions are from the numeric extensions to C included in ISO C 9X.
Which of the three versions of a function should be used depends on the situation. For most calculations, the `float' functions are the fastest. On the other hand, the `long double' functions have the highest precision. `double' is somewhere in between. It is usually wise to pick the narrowest type that can accommodate your data. Not all machines have a distinct `long double' type; it may be the same as `double'.
This is what I know and which is the same as for GPC (with float = Single). However, it doesn't mention the type sizes you gave, except for the following quote:
/* The above constants are not adequate for computation using `long double's. Therefore we provide as an extension constants with similar names as a GNU extension. Provide enough digits for the 128-bit IEEE quad. */
But AFAIUI, it only means that the (long double version of) the constant pi is defined with enough decimal digits for systems where long double is 128 bits, and does not imply that it actually has this size on any given processor (like 80 bits on IA32).
Frank