Bill Allombert on Wed, 05 Oct 2005 13:59:27 +0200


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

Re: Fwd: Incorrect conversion of unnormalized IEEE doubles


On Wed, Oct 05, 2005 at 07:15:51AM -0400, kynn@panix.com wrote:
> I was not able to find mention of this bug at
> http://pari.math.u-bordeaux.fr/Bugs/, but on the other hand I was not
> able to determine what versions numbers correspond to the
> "pari-stable" and "pari" options in that page, so it is possible that
> the version I am using, which is quite old (2.1.3), is not covered in
> these bug reports and that the bug I'm referring to was already
> fixed in "pari-stable".

pari-stable denotes version 2.1.x, pari denotes version 2.2.x.
The latest stable version is 2.1.7.

> Anyway, if any of you is able to reproduce the bug in the PARI
> versions corresponding to the "pari-stable" or "pari" options, please
> let me know, and I'll send in a formal bug report.

I think I can reproduce this bug with all versions (2.1.3, 2.1.7,
2.2.11) by using the C program below:

--------------
#include <pari/pari.h>
#include <float.h>

int main(void)
{
  double g=DBL_MIN/2;
  GEN z;
  pari_init(4000000,2);
  z=dbltor(g);
  pariputsf("%g %Z\n",g,z);
}
--------------

%./a.out
1.11254e-308 1.668805393880401037 E-308

Cheers,
Bill.