Hi to all,

Recently I try ./configure && make && make check on the official source of 
gsl-1.15.
Surprisingly, make check failed on histogram in histogram/test1d.c line 436.
Same with the test programs linked against cyggsl-0.dll.

I was able to reproduce the problem in a more simple manner test.c included

my output in test .out.txt after gcc -o ./test.exe ./test.c running on a 
pentium 4.
my LANG=fr_FR.UTF-8 

it seems that the gcc conversion process fulfilled more accurately the promise 
to round to nearest that newlib/libc/stdlib/strtod.c

Regards
//
// Programme de test
//

#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
        char gg1[] = "1.5113350125944583977e-02";
        char gg2[] = "1.0327455919395465977e-01";
        char gg3[] = "1.1335012594458437896e-01";
        char gg4[] = "1.1586901763224181916e-01";
        
        double hh1 = 1.5113350125944583977e-02;
        double hh2 = 1.0327455919395465977e-01;
        double hh3 = 1.1335012594458437896e-01;
        double hh4 = 1.1586901763224181916e-01;

        char * pEnd;
        
        double jj1 = strtod(gg1, &pEnd);
        double jj2 = strtod(gg2, &pEnd);
        double jj3 = strtod(gg3, &pEnd);
        double jj4 = strtod(gg4, &pEnd);

        printf ("init char = %s \nstrtod    = %.19e \ngcc       = %.19e \n\n", 
gg1, jj1, hh1);
        printf ("init char = %s \nstrtod    = %.19e \ngcc       = %.19e \n\n", 
gg2, jj2, hh2);
        printf ("init char = %s \nstrtod    = %.19e \ngcc       = %.19e \n\n", 
gg3, jj3, hh3);
        printf ("init char = %s \nstrtod    = %.19e \ngcc       = %.19e \n\n", 
gg4, jj4, hh4);

        return 0;
}
init char = 1.5113350125944583977e-02 
strtod    = 1.5113350125944582242e-02 
gcc       = 1.5113350125944583977e-02 

init char = 1.0327455919395465977e-01 
strtod    = 1.0327455919395464590e-01 
gcc       = 1.0327455919395465977e-01 

init char = 1.1335012594458437896e-01 
strtod    = 1.1335012594458436508e-01 
gcc       = 1.1335012594458437896e-01 

init char = 1.1586901763224181916e-01 
strtod    = 1.1586901763224180528e-01 
gcc       = 1.1586901763224181916e-01 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to