[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mpz_out_str and mpz_get_str broken?
From: |
Kettler, Neal |
Subject: |
mpz_out_str and mpz_get_str broken? |
Date: |
Thu, 8 Feb 2001 15:18:55 -0800 |
I downloaded
gmp-3.1.1.tar.gz today. I'm writing a little test program using RSA
encryption. I was using mpz_out_str() to print my public keyset. I
couldn't figure out why, but all the digits after the first 10 or so were
wrong. There were however the correct number of digits. I was
definately using base 10 to output the numbers so that shouldn't be the
problem.
I thought it must be
my bug so I wrote my own little conversion routine that repeatedly divided my
number by ten and printed the remainders in reverse order. This correctly
displayed the number.
Small values always
display correctly and the first 10 or so digits are also always correct.
This also affects mpz_get_str().
I'm using Solaris
2.7 on x86 hardware. I used gcc 2.95.2 to build the
library.
- Neal
Kettler
- mpz_out_str and mpz_get_str broken?,
Kettler, Neal <=