Quote:
LBL 'SAVAGE
TIME
RAD
2499
1
LBL 00
X^2
SQRT
LN
E^X
ATAN
TAN
1
+
DSE Y
GTO 00
TIME
R^
HMS-
BEEP
I really really dislike that version of the Savage Benchmark:
1. It only iterates 2499 times to produce the near 2500 result. It would be more elegant for it to do a full 2500 iterations to produce that near 2500 result!
2. It first squares the number, then takes the square root. That's a little cheesy, because if every other result were perfect the "square, then square root" sequence would be operating only on whole numbers. Better to take square root first, then do square.
Those two imperfections stem from the common implementation of the Savage Benchmark on early PCs using some version of the BASIC language. In BASIC it's slightly more complex to do the job right, i.e., without the objectionable aspects I listed above. In common calculator syntax, it's just as easy to do the job right as not.
I use the Savage Benchmark version that corrects those issues.
Example of RPN version on HP 42S: (Put 2500 in X and execute SB)
LBL "SB"
RAD
0
LBL 01
1
+
SQRT
X^2
LN
E^X
ATAN
TAN
DSE ST Y
GTO 01
BEEP
DEG
END
Results: 2499.99946106 in 605 seconds
Example of RPL version on HP 50G: (Execute SB)
<< RAD TICKS 0. 1. 2500.
START 1. + sqrt SQ LN EXP ATAN TAN NEXT
SWAP TICKS SWAP - B->R 8192. /
DEG 800. 2. BEEP >>
'SB' STO
Results: 2499.99946106 in 64.9 seconds
Example of Algebraic version on HP 20S: (Put 2500 in display and execute B)
LBL B
RAD
STO 0
0
LBL 1
+
1
=
sqrt
X^2
LN
E^X
ATAN
TAN
STO 1
1
STO-0
RCL 0
X=0?
GTO 2
RCL 1
GTO 1
LBL 2
STO 1
DEG
RTN
Results: 2499.99946106 in 350 seconds
One of the fastest HP machines is the original HP 30b, programmed in RPN. Its results are 2499.99946106 in 6.5 seconds.
The more sophisticated algorithms found the the WP 34S cause its results from the same hardware to be very accurate, but also rather slow even with external DC power: 2500.00000001 (actually, 2500.000000006559) in about 300 seconds.
Performing this on the WP 34S without external power will give variously longer run times. With fresh CR 2032 batteries I get about 450 seconds as the WP 34S automatically slows its speed when low battery voltage is sensed, even with new batteries, during the later portion of the run.
Edited: 25 Sept 2013, 7:18 p.m.