Georgi Guninski on Fri, 16 Feb 2024 18:01:14 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Numerical instability in extracting base B digits of the fractional part of real
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: Numerical instability in extracting base B digits of the fractional part of real
- From: Georgi Guninski <gguninski@gmail.com>
- Date: Fri, 16 Feb 2024 19:00:51 +0200
- Delivery-date: Fri, 16 Feb 2024 18:01:14 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708102872; x=1708707672; darn=pari.math.u-bordeaux.fr; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=8+s+LVrVvX1FMkfEanUJXDrNvhd9hoZx8wd6HPG42pU=; b=EV9mZUEtI5yx4uxaMYZ0BIELUdT7nQsrULxWbNE2knyynBru01oPiGCpwBbigdBAgD WgOGn8xbl/5aSg1egGI4M4FUWlCZwlbA4S3PWGMefaWHORpja0T/DEswlvcWyps8jIqf 4L+uvnAnBU8PvhF51OnJmOhufLGHhb6a1Aon762adcGwlBkOBwCS63kH9jWJKvnWjybD GiR621qnXqvJPacYXMz1y1UyVgC6RL+ZsHnvfX13Lqtuboe/9hqo1YMHnsYSxCHaBtJl EaulscqalRYqqjgas4rFAL6CN2QpRgHoo2C0F5KgORtSpic3f9P9PD6VxV4YLRMbJmd8 fEIg==
- In-reply-to: <Zc+InbDj44/YHxrK@seventeen>
- References: <CAGUWgD9jh04yWKo8gnd=oT8sxt---hQiq65tGc0cM6Mxnk3wdw@mail.gmail.com> <Zc9EKwc0OJ8gF/b6@seventeen> <CAGUWgD9R94BGzucES2RMAkakRr8z0yygJrAm-ontN-uWe0Pn+g@mail.gmail.com> <Zc+InbDj44/YHxrK@seventeen>
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