bug-gmp
[Top][All Lists]
Advanced

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

Re: gmp 4.1 documentation improvement suggestions


From: Kevin Ryde
Subject: Re: gmp 4.1 documentation improvement suggestions
Date: Sat, 30 Nov 2002 06:58:10 +1000
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-debian-linux-gnu)

Serge Winitzki <address@hidden> writes:
>
>       double mpf_get_d_2exp (signed long int exp, mpf_t op)
>
> It should be "signed long int* exp".

Thanks, we spotted that too.  It's corrected in 4.1.1 which even as we
speak is making its way to ftp.gnu.org.

> 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"

Yes, that's the case.

> but reading from a string is not an arithmetic operation

Well, it is really.  The string represents a certain value, as a
base-10 fraction or whatever, and that value gets truncated (if
necessary) into the destination.

> and in any case I was confused by this and had to write a test 
> program to figure this out.

I'm not sure how much should be said specifically, since it all
follows general rules.

Maybe something about truncation, and the folly of for instance
expecting say "0.1" in decimal to come out exact, would give a hint.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]