Re: Numerical instability in extracting base B digits of the fractional part of real

Georgi Guninski <[email protected]> Fri, 16 Feb 2024 19:00:51 +0200
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <CAGUWgD8tZP-8T1jStNjMCAqG59QNRfNAJaMCNQYq+q_BV42_hA@mail.gmail.com>
Thanks.
I think you are not computing the same algorithm, since you
hardcode $d=3$:

? A=0.33;B=10;
? C=A*B;d=floor(C);A=C-d
%98 = 0.30000000000000000000000000000000000000
? C=A*B;d=floor(C);A=C-d
%99 = 0.99999999999999999999999999999999999998
? d
%100 = 2