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:
from libc.info: " File: libc.info, Node: Mathematics, Next: Arithmetic, Prev: Low-Level Terminal Interface, Up: Top
Mathematics ***********
This chapter contains information about functions for performing mathematical computations, such as trigonometric functions. Most of these functions have prototypes declared in the header file `math.h'. The complex-valued functions are defined in `complex.h'.
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'. "
( I think the order should be 'float', 'double', and 'long double' )
from glibc-2.1.3/math/math.h:
" /* Some useful constants. */
[..]
# define M_PI 3.14159265358979323846 /* pi */
/* 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. */
#ifdef __USE_GNU
[..]
# define M_PIl 3.1415926535897932384626433832795029L /* pi */
[..]
#endif "
Hope this helps Russ