debug/8192: exp10 in mathcalls.h (gcc ver 2.95.3)
bertlaubsch@yahoo.com
bertlaubsch@yahoo.com
Thu Oct 10 15:26:00 GMT 2002
>Number: 8192
>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:26: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"
More information about the Gcc-prs
mailing list