public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/403] New: exp10 gives nonsense results
@ 2004-09-24  7:32 fabian at fs-maphy dot uni-hannover dot de
  2004-09-24  7:40 ` [Bug libc/403] " jakub at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fabian at fs-maphy dot uni-hannover dot de @ 2004-09-24  7:32 UTC (permalink / raw)
  To: glibc-bugs

Hi,

exp10 gives me always the same result for different parameters.
When I assign some variables before, the results will be
different (i.e. 1 instead of -1.996864) but still the same
for different parameters

#include <math.h>
#include <stdio.h>

int main(int argc, char **argv) {
/*    double x, y;
    x = 5;
    y = exp10(x);
    printf("exp10(x) = %f\n", y); */
    printf("exp10(-4) = %f\n", exp10(-4.));
    printf("exp10(-1) = %f\n", exp10(-1.));
    printf("exp10(0) = %f\n", exp10(0.));
    printf("exp10(1) = %f\n", exp10(1.));
    printf("exp10(2) = %f\n", exp10(2.));
    printf("exp10(4) = %f\n", exp10(4.));
    printf("exp10(8) = %f\n", exp10(8.));
    return 0;
}

Gives me:
exp10(-4) = -1.996864
exp10(-1) = -1.996864
exp10(0) = -1.996864
exp10(1) = -1.996864
exp10(2) = -1.996864
exp10(4) = -1.996864
exp10(8) = -1.996865

And with un-commented part:
exp10(x) = 1.000000
exp10(-4) = 1.000000
exp10(-1) = 1.000000
exp10(0) = 1.000000
exp10(1) = 1.000000
exp10(2) = 1.000000
exp10(4) = 1.000000
exp10(8) = 1.000000

glibc is libc-2.3.2
kernel is linux-2.4.20
gcc is 3.3 20030226 (prerelease) (SuSE Linux)

-- 
           Summary: exp10 gives nonsense results
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P3
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: fabian at fs-maphy dot uni-hannover dot de
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: i486-suse-linux
GCC target triplet: i686


http://sources.redhat.com/bugzilla/show_bug.cgi?id=403

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/403] exp10 gives nonsense results
  2004-09-24  7:32 [Bug libc/403] New: exp10 gives nonsense results fabian at fs-maphy dot uni-hannover dot de
@ 2004-09-24  7:40 ` jakub at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jakub at redhat dot com @ 2004-09-24  7:40 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-09-24 07:40 -------
exp10 is a GNU extension too.

*** This bug has been marked as a duplicate of 402 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


http://sources.redhat.com/bugzilla/show_bug.cgi?id=403

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2004-09-24  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24  7:32 [Bug libc/403] New: exp10 gives nonsense results fabian at fs-maphy dot uni-hannover dot de
2004-09-24  7:40 ` [Bug libc/403] " jakub at redhat dot com

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