Mail Archives: djgpp/1998/11/16/09:50:56
moshier AT mediaone DOT net wrote:
> In x86 coprocessors, not only the arithmetic but also the elementary
> functions like log and tan are computed in long double anyway,
> so there is essentially no speed difference.
True, but there are a few caveats:
1. Existing "double" routines get args passed on the stack, so they are
rounded to 53 bits, even though the result winds up on the FPU stack in the
long double format, so one has to change the arg-passing mechanism.
2. For functions that are ill-conditioned, such as exp() for large
arguments, precision *greater* than long double must be used in internal
computations. Thus, if one makes the obvious changes to a double routine,
it may have long double accuracy only in parts of the ranges.
-Eric Rudd
rudd AT cyberoptics DOT com
- Raw text -