In another thread, Tim gave an example of an XG error that XG makes in
a particular position (probably class of position) intermittently.
However, the bug affects XG's evaluations only, not its play.
What the code does (as part of a test) is to take the mean of several instances of 0.1. Sometimes, it correctly calculates the mean to be 0.1 but sometimes it calculates the mean to be (approx) 0.1 - 1e-17 (in other words
0.0999999999.....(I'm too lazy to count out all the 9s.))
So, at least in python, we can get undefined behaviour very readily with
very simple examples.
I very much doubt that this would happen in C++ where arithmetic
processes are much better documented and standardised.
On 9/13/2022 5:51 AM, peps...@gmail.com wrote:
What the code does (as part of a test) is to take the mean of several
instances of 0.1. Sometimes, it correctly calculates the mean to be
0.1 but sometimes it calculates the mean to be (approx) 0.1 - 1e-17
(in other words
0.0999999999.....(I'm too lazy to count out all the 9s.))
So, at least in python, we can get undefined behaviour very readily with
very simple examples.
I very much doubt that this would happen in C++ where arithmetic
processes are much better documented and standardised.
Part of the problem lies not with Python or C++ but with the IEEE
floating point standard itself, which does not completely specify
everything.
My understanding is that in C and C++, even if you've declared the....
datatypes as floating point, if all the operands are integer values it
uses the algorithm for integer arithmetic instead of floating point
(with all the issues you have to deal with when using a finite model of
the real numbers).
On 9/13/2022 5:51 AM, peps...@gmail.com wrote:
In another thread, Tim gave an example of an XG error
that XG makes in a particular position (probably class
of position) intermittently. However, the bug affects
XG's evaluations only, not its play.
I don't actually know that the bug does not affect its play,
although it's true that I don't have any examples.
I very much doubt that this would happen in C++ where
arithmetic processes are much better documented and
standardised.
Part of the problem lies not with Python or C++ but with
the IEEE floating point standard itself, which does not
completely specify everything.
As a python coder (among other things), I found .....
What the code does (as part of a test) is to take the
mean of several instances of 0.1. Sometimes, it
correctly calculates the mean to be 0.1 but sometimes
it calculates the mean to be (approx) 0.1 - 1e-17
On September 13, 2022 at 6:35:19 AM UTC-6, Tim Chow wrote:
On 9/13/2022 5:51 AM, peps...@gmail.com wrote:
In another thread, Tim gave an example of an XG error
that XG makes in a particular position (probably class
of position) intermittently. However, the bug affects
XG's evaluations only, not its play.
I don't actually know that the bug does not affect its play,
although it's true that I don't have any examples.
Have you found enough similar examples to justify his
saying a "class" (possibly many "classes") of positions?
And what about "intermittently"? Have you checked to
see if it's "consistent" rather than "intermittent"? (which
wouldn't take only a minimal effort)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 20:23:10 |
Calls: | 6,667 |
Calls today: | 1 |
Files: | 12,216 |
Messages: | 5,337,146 |