[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gmp 4.1 documentation improvement suggestions
From: |
Serge Winitzki |
Subject: |
gmp 4.1 documentation improvement suggestions |
Date: |
Fri, 29 Nov 2002 14:39:06 -0500 (EST) |
Thank you for the great work on the GMP library! This seems to be the
best arbitrary-precision library out there.
I found two places in the gmp 4.1 documentation that I'd suggest
to improve:
1) In the section "Floating-point operations/Converting floats" there is
the following function prototype:
double mpf_get_d_2exp (signed long int exp, mpf_t op)
It should be "signed long int* exp".
2) It may be not clear that when reading a float number through
mpf_set_str from a string, not all digits in a string may be read, but
only those that fit into the target precision of the mpf_t object. So
the users should make sure that there are enough bits available there.
This of course follows from the general rule "everything is done to
target precision" but reading from a string is not an arithmetic
operation and in any case I was confused by this and had to write a test
program to figure this out.
Regards,
--
Serge
- gmp 4.1 documentation improvement suggestions,
Serge Winitzki <=