puzzle with bfloat and radcan



On Mon, May 14, 2012 at 3:42 PM, Richard Fateman
<fateman at eecs.berkeley.edu>wrote:

> xnum : ((6-4*sqrt(2))*log(3-2*sqrt(2)**)+(3-2*sqrt(2))*log(17-12***
> sqrt(2))+32-24*sqrt(2));
> xden :(48*sqrt(2)-72)*(log(sqrt(2)+**1)+sqrt(2))/3;
> x    : xnum/xden;
>
> fpprec:40;
>
> bfloat(radcan(x^16));    produces 1. Actually, the number 1.**
> 000000000000000009792437985633**294125296b0.
>
> bfloat(radcan(x^32));  produces 0.0b0.
>
>
> So, we have this situation:
>
> there is a number  p such p^16 is 1, but p^32 is zero.
>
>
Using 100 digits produces 1 for p^32.

Looking at the output of radcan(x^32) shows some integers with 58 digits or
more, so fpprec:40 may not be big enough?

Although getting exactly 0b0 seems rather suspicious or very unlucky that
everything cancels out exactly.

Ray