From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3107 invoked by alias); 10 Oct 2002 22:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 3085 invoked by uid 71); 10 Oct 2002 22:36:00 -0000 Resent-Date: 10 Oct 2002 22:36:00 -0000 Resent-Message-ID: <20021010223600.3083.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, suse@suse.de, support@suse.de Resent-Reply-To: gcc-gnats@gcc.gnu.org, bertlaubsch@yahoo.com Received: (qmail 2793 invoked by uid 61); 10 Oct 2002 22:34:54 -0000 Message-Id: <20021010223454.2792.qmail@sources.redhat.com> Date: Thu, 10 Oct 2002 15:36:00 -0000 From: bertlaubsch@yahoo.com Reply-To: bertlaubsch@yahoo.com To: gcc-gnats@gcc.gnu.org Cc: suse@suse.de, support@suse.de X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: suse@suse.de, support@suse.de Subject: debug/8193: exp10 in mathcalls.h (gcc ver 2.95.3) X-SW-Source: 2002-10/txt/msg00429.txt.bz2 List-Id: >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"