Mail Archives: cygwin/2012/02/24/08:37:42
------=_Part_115308_1268637465.1330090628573
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
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
------=_Part_115308_1268637465.1330090628573
Content-Type: text/plain; name=test.c
content-transfer-encoding: quoted-printable
Content-Disposition: attachment; size=1214; filename=test.c
//
// Programme de test
//
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
char gg1[] =3D "1.5113350125944583977e-02";
char gg2[] =3D "1.0327455919395465977e-01";
char gg3[] =3D "1.1335012594458437896e-01";
char gg4[] =3D "1.1586901763224181916e-01";
=09
double hh1 =3D 1.5113350125944583977e-02;
double hh2 =3D 1.0327455919395465977e-01;
double hh3 =3D 1.1335012594458437896e-01;
double hh4 =3D 1.1586901763224181916e-01;
char * pEnd;
=09
double jj1 =3D strtod(gg1, &pEnd);
double jj2 =3D strtod(gg2, &pEnd);
double jj3 =3D strtod(gg3, &pEnd);
double jj4 =3D strtod(gg4, &pEnd);
printf ("init char =3D %s \nstrtod =3D %.19e \ngcc =3D %.19e \n\n=
", gg1, jj1, hh1);
printf ("init char =3D %s \nstrtod =3D %.19e \ngcc =3D %.19e \n\n=
", gg2, jj2, hh2);
printf ("init char =3D %s \nstrtod =3D %.19e \ngcc =3D %.19e \n\n=
", gg3, jj3, hh3);
printf ("init char =3D %s \nstrtod =3D %.19e \ngcc =3D %.19e \n\n=
", gg4, jj4, hh4);
return 0;
}
------=_Part_115308_1268637465.1330090628573
Content-Type: text/plain; name=test.out.txt
content-transfer-encoding: quoted-printable
Content-Disposition: attachment; size=684; filename=test.out.txt
init char =3D 1.5113350125944583977e-02=20
strtod =3D 1.5113350125944582242e-02=20
gcc =3D 1.5113350125944583977e-02=20
init char =3D 1.0327455919395465977e-01=20
strtod =3D 1.0327455919395464590e-01=20
gcc =3D 1.0327455919395465977e-01=20
init char =3D 1.1335012594458437896e-01=20
strtod =3D 1.1335012594458436508e-01=20
gcc =3D 1.1335012594458437896e-01=20
init char =3D 1.1586901763224181916e-01=20
strtod =3D 1.1586901763224180528e-01=20
gcc =3D 1.1586901763224181916e-01=20
------=_Part_115308_1268637465.1330090628573
Content-Type: text/plain; charset=us-ascii
--
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
------=_Part_115308_1268637465.1330090628573--
- Raw text -