Help with testing 4.1.3

Paul Zimmermann Paul.Zimmermann at loria.fr
Mon Apr 26 12:23:34 CEST 2004


   Date: Sat, 24 Apr 2004 21:32:32 -0600 (MDT)
   From: Scott Bucholtz <linuxman at nmt.edu>

   This seems like the same problem I'm having.  mpfr.org reports a 
   bug-fixed sqrt() function but that is for (I believe) the newest version 
   of MPFR (and not for the one distributed with GMP-4.1.2.  Can we upgrade 
   all of MPFR to the latest version for 4.1.3 to elevate these problems?

   [...]

   Scott Bucholtz
   IT System Engineer for Research and Development
   Honeywell FM&T/NM
   work:   (505) 661-8496
   cell:   (505) 570-3000

As already noticed by Kevin, here the problem is due to the s390 libm,
and not to mpfr. For example in the 2nd failed test case:

| mpfr_sqrt_ui differs from sqrt for a=747735499, rnd_mode=GMP_RNDU
| sqrt gives 2.73447526776162303577e+04, mpfr_sqrt_ui gives
| 2.73447526776162339956e+04 (1 ulp)
| FAIL: tsqrt_ui

you can easily see that the square of the libm square root is smaller
than a=747735499, thus not conforming to IEEE 754 for rounding toward
+infinity (GMP_RNDU):

> (2.73447526776162303577e+04)^2;
                                                        9
                      .747735498999999999776111224980 10

We have removed those comparisons with the libm in the development version
of mpfr. We are currently developing a separate tool (mpcheck), based on
mpfr, to check the correctness and/or accuracy of your math library.

Regards,
Paul Zimmermann



More information about the gmp-devel mailing list