groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Floating point arithmetic in groff


From: Bruno Haible
Subject: Re: [Groff] Floating point arithmetic in groff
Date: Tue, 7 Feb 2006 13:06:03 +0100
User-agent: KMail/1.5

Werner Lemberg wrote:
> I then hesitated to add it to groff because it adds code which
> produces platform-dependent results, .... the
> situation has become much better, and today most of the IEEE
> implementations appear to work fine.

Results of elementary and transcendental functions are still far from being
platform-independent today:
  - The x86 compatible processors perform many 'double' computations with
    64 bits of precision, instead of 53 bits as in IEEE. After rounding,
    this manifests through changes in the last mantissa bit.
  - The file listing the maximum deviation of the transcendental function
    results from the exact values in glibc (called
    glibc/sysdeps/i386/fpu/libm-test-ulps) is updated occasionally,
    when new processor versions from Intel or AMD are published.
  - The behaviour of floating-point division by 0 or of floating-point
    overflow is platform dependent: On Linux/alpha these yield an exception
    (SIGFPE) by default, whereas on Linux/x86 they yield a NaN and Infinity
    value, respectively.

> (see http://www.math.utah.edu/pub/hoc/)

The comments in hoc-7.0.6.beta/chkieee.c and the #ifdefs in the rest of this
package also indicate that there are major portability problems.

TeX had platform-independent output as a design goal; I believe this is still
as important as it was 25 years ago.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]