public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* debug/8193: exp10 in mathcalls.h  (gcc ver 2.95.3)
@ 2002-10-10 15:36 bertlaubsch
  0 siblings, 0 replies; only message in thread
From: bertlaubsch @ 2002-10-10 15:36 UTC (permalink / raw)
  To: gcc-gnats; +Cc: suse, support


>Number:         8193
>Category:       debug
>Synopsis:       exp10 in mathcalls.h  (gcc ver 2.95.3)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 10 15:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     bertlaubsch@yahoo.com
>Release:        gcc version 2.95.3 20010315 (SuSE)
>Organization:
>Environment:
running suse 8.0
>Description:
summary: I was trying to use a math call to double exp10(double) and am getting some buggy results.

ok.

so i i browsed throught the mathcalls file and found a function exp10 which I wanted to use. 

in /usr/include/bits/mathcalls.h :

#ifdef __USE_GNU
/* A function missing in all standards: compute exponent to base ten.  */
__MATHCALL (exp10,, (_Mdouble_ __x));
/* Another name occasionally used.  */
__MATHCALL (pow10,, (_Mdouble_ __x));
#endif


the program is completely buggy if i don't write my own exp10 function.

>How-To-Repeat:
compile the sources above. 

repeat this on running the buggy binary:
> ./a.out 
enter lambda in meters in format (num  exp)1 0

> >> nu=1.000000e-03  = 1.000000e-03  angstroms 

enter lambda in meters in format (num  exp)1 1

> >> nu=1.000000e-03  = 1.000000e-03  angstroms 

enter lambda in meters in format (num  exp)1 6

> >> nu=1.000000e-03  = 1.075247e+06  angstroms 

enter lambda in meters in format (num  exp)


---note:

i added one debugging line to the my file
(setting nu to a fixed number should produce a constant output after the >>> below) yet i get very unexpected results; the program output is totally unexpected and spurious:

>Fix:
when i define my own exp10 function the program behaves as expected. the test program is attached. I believe this shows some corruption in the call exp10.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="m2hz.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="m2hz.c"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-10 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 15:36 debug/8193: exp10 in mathcalls.h (gcc ver 2.95.3) bertlaubsch

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).