Re: [Pharo-users] Pharo float precision vs Python

2020-03-20 Thread Sven Van Caekenberghe
Thanks for sharing, this is indeed something quite subtle. > On 20 Mar 2020, at 16:19, Tim Mackinnon wrote: > > Actually I can answer my own question - its the difference between #sum and > #sumNumbers (and an easy mistake to make - I almost wish that sum was the > sumNumbers implementation

Re: [Pharo-users] Pharo float precision vs Python

2020-03-20 Thread Tim Mackinnon
Actually this isn’t quite so simple - as the problem outline below compounds itself by the use of #average (which uses #sum and not #sumNumbers) and thus gives a less precise answer. Why wouldn’t #average use #sumNumbers inside? Or does there need to be #averageNumbers as a complement ….

Re: [Pharo-users] Pharo float precision vs Python

2020-03-20 Thread Tim Mackinnon
Actually I can answer my own question - its the difference between #sum and #sumNumbers (and an easy mistake to make - I almost wish that sum was the sumNumbers implementation and there was a sumSample that behaved like now) > On 20 Mar 2020, at 14:52, Tim Mackinnon wrote: > > Hi guys - I

[Pharo-users] Pharo float precision vs Python

2020-03-20 Thread Tim Mackinnon
Hi guys - I recall this came up a few months ago, but I’m curious about the difference of Pharo’s use of Float64 vs Python - as I assumed that if languages use the same IEEE spec (or whatever spec it is) that simple stuff would be quite similar. I am curious why in Python adding these numbers: