Re: Precision Tail-off?

2023-02-18 Thread Oscar Benjamin
On Sat, 18 Feb 2023 at 11:19, Peter J. Holzer wrote: > > On 2023-02-18 03:52:51 +, Oscar Benjamin wrote: > > On Sat, 18 Feb 2023 at 01:47, Chris Angelico wrote: > > > On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list > > > > To avoid it you would need to use an algorithm that computes

Re: Precision Tail-off?

2023-02-18 Thread Peter J. Holzer
On 2023-02-18 03:52:51 +, Oscar Benjamin wrote: > On Sat, 18 Feb 2023 at 01:47, Chris Angelico wrote: > > On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list > > > To avoid it you would need to use an algorithm that computes nth > > > roots directly rather than raising to the power 1/n.

Re: Precision Tail-off?

2023-02-17 Thread Oscar Benjamin
On Sat, 18 Feb 2023 at 01:47, Chris Angelico wrote: > > On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list > wrote: > > > > On 18/02/23 7:42 am, Richard Damon wrote: > > > On 2/17/23 5:27 AM, Stephen Tucker wrote: > > >> None of the digits in RootNZZZ's string should be different from the

Re: Precision Tail-off?

2023-02-17 Thread Michael Torrie
On 2/17/23 15:03, Grant Edwards wrote: > Every fall, the groups were again full of a new crop of people who had > just discovered all sorts of bugs in the way > implemented floating point, and pointing them to a nicely written > document that explained it never did any good. But to be fair,

Re: Precision Tail-off?

2023-02-17 Thread Chris Angelico
On Sat, 18 Feb 2023 at 12:41, Greg Ewing via Python-list wrote: > > On 18/02/23 7:42 am, Richard Damon wrote: > > On 2/17/23 5:27 AM, Stephen Tucker wrote: > >> None of the digits in RootNZZZ's string should be different from the > >> corresponding digits in RootN. > > > > Only if the storage

Re: Precision Tail-off?

2023-02-17 Thread Greg Ewing via Python-list
On 18/02/23 7:42 am, Richard Damon wrote: On 2/17/23 5:27 AM, Stephen Tucker wrote: None of the digits in RootNZZZ's string should be different from the corresponding digits in RootN. Only if the storage format was DECIMAL. Note that using decimal wouldn't eliminate this particular problem,

Re: Precision Tail-off?

2023-02-17 Thread Grant Edwards
On 2023-02-17, Mats Wichmann wrote: > And... this topic as a whole comes up over and over again, like > everywhere. That's an understatement. I remember it getting rehashed over and over again in various USENET groups 35 years ago when when the VAX 11/780 BSD machine on which I read news

Re: Precision Tail-off?

2023-02-17 Thread Mats Wichmann
On 2/17/23 11:42, Richard Damon wrote: On 2/17/23 5:27 AM, Stephen Tucker wrote: The key factor here is IEEE floating point is storing numbers in BINARY, not DECIMAL, so a multiply by 1000 will change the representation of the number, and thus the possible resolution errors. Store you

Re: Precision Tail-off?

2023-02-17 Thread Grant Edwards
On 2023-02-17, Richard Damon wrote: > [...] > >> Perhaps this observation should be brought to the attention of the IEEE. I >> would like to know their response to it. > > That is why they have developed the Decimal Floating point format, to > handle people with those sorts of problems. > > They

Re: Precision Tail-off?

2023-02-17 Thread Peter J. Holzer
On 2023-02-17 14:39:42 +, Weatherby,Gerard wrote: > IEEE did not define a standard for floating point arithmetics. They > designed multiple standards, including a decimal float point one. > Although decimal floating point (DFP) hardware used to be > manufactured, I couldn’t find any current

Re: Precision Tail-off?

2023-02-17 Thread Peter J. Holzer
On 2023-02-17 10:27:08 +, Stephen Tucker wrote: > This is a hugely controversial claim, I know, but I would consider this > behaviour to be a serious deficiency in the IEEE standard. > > Consider an integer N consisting of a finitely-long string of digits in > base 10. > > Consider the

Re: Precision Tail-off?

2023-02-17 Thread Peter J. Holzer
On 2023-02-17 08:38:58 -0700, Michael Torrie wrote: > On 2/17/23 03:27, Stephen Tucker wrote: > > Thanks, one and all, for your reponses. > > > > This is a hugely controversial claim, I know, but I would consider this > > behaviour to be a serious deficiency in the IEEE standard. > > No matter

Re: Precision Tail-off?

2023-02-17 Thread Oscar Benjamin
On Fri, 17 Feb 2023 at 10:29, Stephen Tucker wrote: > > Thanks, one and all, for your reponses. > > This is a hugely controversial claim, I know, but I would consider this > behaviour to be a serious deficiency in the IEEE standard. [snip] > > Perhaps this observation should be brought to the

Re: Precision Tail-off?

2023-02-17 Thread Richard Damon
On 2/17/23 5:27 AM, Stephen Tucker wrote: Thanks, one and all, for your reponses. This is a hugely controversial claim, I know, but I would consider this behaviour to be a serious deficiency in the IEEE standard. Consider an integer N consisting of a finitely-long string of digits in base 10.

Re: Precision Tail-off?

2023-02-17 Thread Michael Torrie
On 2/17/23 03:27, Stephen Tucker wrote: > Thanks, one and all, for your reponses. > > This is a hugely controversial claim, I know, but I would consider this > behaviour to be a serious deficiency in the IEEE standard. No matter how you do it, there are always tradeoffs and inaccuracies moving

Re: Precision Tail-off?

2023-02-17 Thread Peter Pearson
On Fri, 17 Feb 2023 10:27:08, Stephen Tucker wrote:[Head-posting undone.] > On Thu, Feb 16, 2023 at 6:49 PM Peter Pearson > wrote: >> On Tue, 14 Feb 2023 11:17:20 +, Oscar Benjamin wrote: >> > On Tue, 14 Feb 2023 at 07:12, Stephen Tucker >> wrote: >> [snip] >> >> I have just produced the

RE: Precision Tail-off?

2023-02-17 Thread avi.e.gross
? -Original Message- From: Python-list On Behalf Of Stephen Tucker Sent: Friday, February 17, 2023 5:27 AM To: python-list@python.org Subject: Re: Precision Tail-off? Thanks, one and all, for your reponses. This is a hugely controversial claim, I know, but I would consider this behaviour

Re: Precision Tail-off?

2023-02-17 Thread Weatherby,Gerard
until a few years ago, but they seem to have gone dark: https://twitter.com/SilMinds From: Python-list on behalf of Thomas Passin Date: Friday, February 17, 2023 at 9:02 AM To: python-list@python.org Subject: Re: Precision Tail-off? *** Attention: This is an external email. Use caution

Re: Precision Tail-off?

2023-02-17 Thread Thomas Passin
On 2/17/2023 5:27 AM, Stephen Tucker wrote: Thanks, one and all, for your reponses. This is a hugely controversial claim, I know, but I would consider this behaviour to be a serious deficiency in the IEEE standard. Consider an integer N consisting of a finitely-long string of digits in base

Re: Precision Tail-off?

2023-02-17 Thread Stephen Tucker
As a follow-up to my previous message, I have just produced the following log on IDLE, for your information: -- >>> math.e ** (math.log (12345678900) / 3) 4.979338592181741e+16 >>> 10 ** (math.log10

Re: Precision Tail-off?

2023-02-17 Thread Stephen Tucker
Thanks, one and all, for your reponses. This is a hugely controversial claim, I know, but I would consider this behaviour to be a serious deficiency in the IEEE standard. Consider an integer N consisting of a finitely-long string of digits in base 10. Consider the infinitely-precise cube root

Re: Precision Tail-off?

2023-02-16 Thread Peter Pearson
On Tue, 14 Feb 2023 11:17:20 +, Oscar Benjamin wrote: > On Tue, 14 Feb 2023 at 07:12, Stephen Tucker wrote: [snip] >> I have just produced the following log in IDLE (admittedly, in Python >> 2.7.10 and, yes I know that it has been superseded). >> >> It appears to show a precision tail-off as

Re: Precision Tail-off?

2023-02-15 Thread Weatherby,Gerard
) 8.881784197001252e-16 1E-99 From: Python-list on behalf of Michael Torrie Date: Tuesday, February 14, 2023 at 5:52 PM To: python-list@python.org Subject: Re: Precision Tail-off? *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** On 2

Re: Precision Tail-off?

2023-02-14 Thread Michael Torrie
On 2/14/23 00:09, Stephen Tucker wrote: > I have two questions: > 1. Is there a straightforward explanation for this or is it a bug? To you 1/3 may be an exact fraction, and the definition of raising a number to that power means a cube root which also has an exact answer, but to the computer, 1/3

Re: Precision Tail-off?

2023-02-14 Thread Weatherby,Gerard
Use Python3 Use the decimal module: https://docs.python.org/3/library/decimal.html From: Python-list on behalf of Stephen Tucker Date: Tuesday, February 14, 2023 at 2:11 AM To: Python Subject: Precision Tail-off? *** Attention: This is an external email. Use caution responding, opening

Re: Precision Tail-off?

2023-02-14 Thread Oscar Benjamin
On Tue, 14 Feb 2023 at 07:12, Stephen Tucker wrote: > > Hi, > > I have just produced the following log in IDLE (admittedly, in Python > 2.7.10 and, yes I know that it has been superseded). > > It appears to show a precision tail-off as the supplied float gets bigger. > > I have two questions: >