public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/2146: Invalid optimization for the exponential function
@ 2002-04-01 22:49 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-04-01 22:49 UTC (permalink / raw)
  To: Frederic.Goualard, gcc-bugs, gcc-prs, nobody

Synopsis: Invalid optimization for the exponential function

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Mon Apr  1 22:49:00 2002
State-Changed-Why:
    Not a gcc problem.  Contact the glibc folk.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2146


^ permalink raw reply	[flat|nested] 2+ messages in thread

* optimization/2146: Invalid optimization for the exponential function
@ 2001-04-01  0:00 Frederic.Goualard
  0 siblings, 0 replies; 2+ messages in thread
From: Frederic.Goualard @ 2001-04-01  0:00 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2146
>Category:       optimization
>Synopsis:       Invalid optimization for the exponential function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 02 02:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Frederic Goualard
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.14-12 on an i686
Environment variables have their default values under this
O.S.
>Description:
GCC optimizes the computation of the exponential
of a constant by replacing the call to the function
provided by the mathematical library by some assembler
instructions to compute it directly.

Without any optimization, the result of exp(-Inf) is correctly
0, but becomes nan whenever one uses the -O1 option or above.
>How-To-Repeat:
#include <stdio.h>
#include <math.h>

int
main()
{
  double a= -1.0/0.0;

  printf("%.16g\n",exp(a));
}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-02  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-01 22:49 optimization/2146: Invalid optimization for the exponential function rth
  -- strict thread matches above, loose matches on Subject: below --
2001-04-01  0:00 Frederic.Goualard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).