glib 2.2.3 test failures on Solaris



I'm getting a test failure in strtod-test on glib-2.2.3 on Solaris
2.5.1-9/SPARC with Sun's C compiler, HP-UX 11.00 with the HP C
compiler, and AIX 5.1 with the IBM C compiler. The problem is:

  d = pow (2.0, -1024.1);
  g_assert (d == g_ascii_strtod (g_ascii_dtostr (buffer, sizeof (buffer), d), NULL));

If I:
  g_ascii_dtostr (buffer, sizeof (buffer), d);
  printf ("%s\n", buffer);
  printf ("%f %f %f\n", d, strtod (buffer, NULL),
          g_ascii_strtod (buffer, NULL));
I get:
  5.1901682964836177e-309
  0.000000 0.000000 0.000000
  (Redhat Linux 9 gives)
    5.1901682964836274e-309
    0.000000 0.000000 -1.231230

-- 
albert chin (china thewrittenword com)



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