Ray,
what I wanted to say is, that fpprec=30 results in displaying exactly 30 digits
of PI (or another number; if the last digits are not zeroes)
and that the last digit is rounded correctly.
The correctness of the number itself is another point.
Greetings
Volker
Raymond Toy schrieb:
> Volker van Nek wrote:
>
>> Remembering the PI computations I did some time ago I found that time that
>> fpprec is very precise. E.g. the following shows that a correct rounding was
>> made at the 30. valid digit.
>>
>> (%i4) fpprec:30$
>> (%i5) bfloat(%pi);
>> (%o5) 3.14159265358979323846264338328b0
>> (%i6) slength(string(%));
>> (%o6) 33
>> (%i7) fpprec:32$
>> (%i8) bfloat(%pi);
>> (%o8) 3.1415926535897932384626433832795b0
>>
> Isn't this because bfloat(%pi) calls fppi1 which calls comppi with 12
> extra bits of precision and then rounds the result to the desired precision?
>
> Ray
>
>
>
>