Subject: Re: Problems with transcendentals in libm
From: [email-masked] (Geoffrey Noer)

22 Apr 1997 20:04:05 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked] (Martin Oldfield)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "Martin Oldfield" at Jul 11, 96 00:23:00 am
X-Mailer: ELM [version 2.4 PL23]
Original-Sender: [email-masked]

Greetings,

I've confirmed that the following problem is fixed in the upcoming beta18
release.  I now get the same behavior for gnu-win32 gcc as for Solaris gcc,
with and without optimization on.  Thanks for the test case!

(I believe this was caused by errors in floating point initialization
in the crt0).

-- 
Geoffrey Noer
[email-masked]

Martin Oldfield wrote:
> 
> The following program produces bogus output. This appears to imply a
> bug in the cosh(x) and tanh(x) functions. Is this a known problem and
> are there any workarounds ?
[...]
> Broken lines running from cygwin32
> 
>          x:       logx       expx      tanhx      coshx      sinhx
>      0.368:         -1       1.44      0.352        NaN      0.376
>       2.72:          1       15.2        NaN        NaN       7.54
>       7.39:          2   1.62e+03        NaN        NaN        809
>       20.1:          3   5.28e+08        NaN        NaN   2.64e+08
> 
>     -0.368:       -Inf      0.692     -0.352        NaN     -0.376
>      -2.72:       -Inf      0.066        NaN        NaN      -7.54
>      -7.39:       -Inf   0.000618        NaN        NaN       -809
>      -20.1:       -Inf   1.89e-09        NaN        NaN  -2.64e+08
> 
> ------------------------------------------------------------------------
> 
> Comparable lines running under linux
> 
>          x:       logx       expx      tanhx      coshx      sinhx
>      0.368:         -1       1.44      0.352       1.07      0.376
>       2.72:          1       15.2      0.991       7.61       7.54
>       7.39:          2   1.62e+03          1        809        809
>       20.1:          3   5.28e+08          1   2.64e+08   2.64e+08
> 
>     -0.368:        NaN      0.692     -0.352       1.07     -0.376
>      -2.72:        NaN      0.066     -0.991       7.61      -7.54
>      -7.39:        NaN   0.000618         -1        809       -809
>      -20.1:        NaN   1.89e-09         -1   2.64e+08  -2.64e+08
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".