[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#34661: libc6: atof returns wildly incorrect values



Package: libc6
Version: 2.0.100-2

doubletest.c:
------------------
#include <stdio.h>
#include <stdarg.h>
main(){
  double foo = atof("1.0");
  double bar = 1.0;
        printf("foo = %f, bar = %f\n", foo, bar);
}
------------------

gamera:~/src> cc -o doubletest doubletest.c
gamera:~/src> doubletest
foo = 2147482352.000000, bar = 1.000000

gcc version (egcs) is 2.91.60-5.  This is on PowerPC and is probably broken on
this platform only.

-Randy

-- System Information
Debian Release: 2.1
Kernel Version: Linux gamera 2.2.0-pre6 #6 Sat Jan 23 14:45:06 EST 1999 ppc unknown

Versions of the packages libc6 depends on:
ii  sysvinit        2.76-3         System-V like init.
ii  ldso            1.9.10-1       The Linux dynamic linker, library and utilit


Reply to: