[Gcl-devel] Bug in mpz_get_d
Torbjorn Granlund
tg at gmplib.org
Mon Dec 14 10:25:32 CET 2009
Enrique Perez-Terron <enrio at online.no> writes:
On Fri, 2009-12-11 at 15:12 -0500, Camm Maguire wrote:
> Greetings! Workaround?
>
> >(setq a (numerator **))
>
> 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069375
>
> >(float a)
>
> 1.0715086071862672E301
>
> >(float (1+ a))
>
> 1.0715086071862673E301
>
> >(float (1- a))
>
> 1.0715086071862672E301
This (LISP) session does not tell me anything, sorry.
Testing GMP and MPFR directly
$ ./test-gmp
Using GMP and mpf_get_d:
================
num = 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069375
1.071508607186267202E+301
1 + num = 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
1.0715086071862673209E+301
1 - num = -10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069374
-1.071508607186267202E+301
OK, some numbers... Anything wrong there?
Using MPFR:
THis is the wrong list for mpfr bugs.
Please explain what you get and what you expect. *One* example of
incorrect+correct data is what we need.
But we need more information than that. Please read
http://gmplib.org/manual/Reporting-Bugs.html#Reporting-Bugs
and send a bug report upon which we have any chance to act!
--
Torbjörn
More information about the gmp-bugs
mailing list