gmp 4.1 documentation improvement suggestions

Serge Winitzki serge@cosmos.phy.tufts.edu
Thu, 12 Dec 2002 10:36:59 -0500 (EST)


>    > I think the manual is clear (well, almost...); it says:
>    > 
>    >     The precision of a calculation is defined as follows: Compute
>    >     the requested operation exactly (with ``infinite precision''),
>    >     and round the result to the destination variable precision with
>    >     the given rounding mode.
> 
>    It seems to me that these two usages of "precision" are different.
> 
>    I'd suggest that the paragraph
> 
>    > > "...if two low-precision numbers of nearly equal magnitude are added, 
>    > > the precision of the result will be limited to what is required to 
>    > > represent the result accurately."
> 
>    be reworded as something like
> 
>    > > "...if two low-precision numbers of nearly equal magnitude are added, 
>    > > MP will not perform more operations than required to 
>    > > compute the result accurately, even if high precision is set 
>    > > in the result. In this case the high precision of the resulting 
>    > > mpfr object will not reflect the actual low precision of this
>    > > calculation."
> 
> Yes that was indeed unclear (and even partly wrong). I suggest rewriting
> both paragraphs in one:
> 
>    The semantics of a calculation in MPFR is specified as follows: Compute the
>    requested operation exactly (with ``infinite accuracy''), and round the result
>    to the precision of the destination variable, with the given rounding mode.
>    The MPFR floating-point functions are intended to be a smooth extension
>    of the IEEE P754 arithmetic. The results obtained on one computer should not
>    differ from the results obtained on a computer with a different word size.
> 
> Is that ok?

Well, if you rewrite it like this, then there is still no mention of the
fact that the precision stored in a variable may be very different from
the logically defined precision of the result (e.g. when two
low-precision variables are multiplied and the result variable has high
precision set in it), i.e. mpfr does not precision tracking. I'd say
that this point is important for anyone who wants to develop
floating-point applications using mpfr.

-- 
	Serge