Post Reply 
HHC 2015 - Savage benchmark curiosity
10-07-2015, 03:18 PM
Post: #1
HHC 2015 - Savage benchmark curiosity
Reading the HHC 2015 paper by Wlodek about the Savage benchmark on the Prime, it occurred to me to run it in newRPL to see how it performs.
Despite a disappointing 15 seconds mark (this benchmarks hits newRPL very hard, due to the variable precision implementation of transcendental functions being significantly slower than fixed-precision counterparts), one thing that attracted my attention was that the results were not identical.
I expected newRPL to return the same exact value when set to 12 digits precision.
Old HP's consistently returned 2499.99948647, while newRPL returned 2499.99942402.

Intrigued by this, and assuming there had to be a bug in newRPL somewhere, I modified the benchmark to leave all 2500 partial results in the stack.
Turns out that results were identical all the way to iteration number 1470.
The value in the stack was exactly 1469.99992223, and the difference came from ATAN, which returns 1.57011605476 on the 50g, but 1.57011605475 in newRPL, and values diverged from there.
The actual result for ATAN(1469.99992223) is:
1.5701160547549999736...

So it's clearly a case of double-rounding. I think the internal 15-digit precision would round 49999 to 500, and therefore round the last digit to 6 instead of 5.

Now I forced the loop to start on the 50g from the corrected value, and this happened again for number 1647.99989715, also in the ATAN function.
In this case ATAN gives 1.57018953071499665..., which again causes the double rounding and values diverge again.

The surprise was... it diverged to the exact same value as before!
Result was 2499.99948647, even when starting from the "correct" sequence after value TAN(ATAN(1469.99992223))+1 = 1470.99991143 was used as starting point.

Why is this surprising? because the difference after doing ATAN and TAN on 1469.99992223 was 2160e-8, and for example the next error at 1647.99989715 is 2716e-8. I don't see how the sequence could "self-correct" to give the exact same result? Perhaps somebody has an explanation?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2015 - Savage benchmark curiosity - Claudio L. - 10-07-2015 03:18 PM



User(s) browsing this thread: 1 Guest(s)