Post Reply 
Summation based benchmark for calculators
12-21-2017, 12:40 PM (This post was last modified: 01-09-2018 10:22 PM by pier4r.)
Post: #1
Summation based benchmark for calculators
There are plenty of tests for calculators, some more organized, some less.

See http://www.hpmuseum.org/cgi-sys/cgiwrap/...i?read=700

or the ones collected in the wiki4hp. http://www.wiki4hp.com/doku.php?id=start&do=index (see the benchmark section).

Seeing the work of Eddie. http://www.hpmuseum.org/forum/thread-5047.html

I thought that when a benchmark includes a summation, like the savage benchmark a bit, but the savage benchmark uses the previous result to compute the next iteration. Such a benchmark could be generic enough for programmable and scientific calculators with summation abilities and could also include different instructions. While the 8 queens benchmark does not really scientific math functions.

I will try something when I have time.

Results in the post below.

note to myself: to collect info it helps to send PM . Thanks to all the contributors!

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-22-2017, 09:41 PM (This post was last modified: 03-06-2024 07:02 PM by pier4r.)
Post: #2
RE: Summation based test for calculators
So as said the summation based test will be very similar to the savage benchmark and I wonder how many similar tests were developed on various forum or groups regarding calculators.

Anyway, inspired by the test done in the thread of Eddie linked in the 1st post, I decided to pick randomly some scientific functions to assemble a summation that may give an idea of the performances of a calculator for common math functions.

The idea is to have a loop working on an increment of the 'x' value that is somewhat independent from the step before (while the savage test uses the value picked from the step before) . Furthermore while the idea of using a function and its inverse is pretty neat (see savage benchmark), some calculators may be very carefully coded figuring this out and therefore simplifying the expression.

I am not that interested in the accuracy, as it is well analyzed in many other posts using other examples (especially by Dieter, that for me will always be the ULPs man).

Surely speed without accuracy is not that neat and so one could go on and build a metric that weights accuracy and speed, as done by a recent HHC (about egyptian fractions), anyway I will collect only timings.

Timings will be collected here, and then moved on the wiki4hp if there are enough of them.

People are encouraged to post timings and results.

So to recap the idea of this test is there because:
- with a summation with increasing x (not dependent on the previous computed value) also some advanced scientific calculators can be tested. See casio fx991EX.
- it is easier to type in and execute. It does not take much time (well unless one is forced to write a program to optimize some parts).
- it may be used with a metric that combines speed and accuracy (a problem would be to get the right accuracy for the problem).
- it avoids to use a function and its inverse to skip very careful optimizations done by the parser. (especially systems with CAS may use this) - this actually didn't always work as noticed by some users. CAS won and poor me not thinking much on the simplification between tan and sin.


Here is the assembled formula (I guess there can be an infinity of formulas that capture the idea I am going to expose).

\[ tan^{-1}(x) \]
So x can be incremented without problems. Picked among the trigonometric functions.

\[ sin \left (tan^{-1}(x) \right ) \]
To let the value increase towards 1, although, after a while, very slowly. Still trig.

\[ e^{ sin \left (tan^{-1}(x) \right ) } \]
to use either a common exponential or a logarithmic function without producing large numbers

\[ \sqrt[3]{e^{ sin \left (tan^{-1}(x) \right ) }} \]
To make the final number even smaller. Using powers.

Final formula to use (adapt the max 'x' value for speedy calculators. For example using 10k or 100k and so on)
\[ \sum_{x=1}^{1000} \sqrt[3]{e^{ sin \left (tan^{-1}(x) \right ) }} \]

As said, it is an arbitrary formula picking functions among some of the most common types of functions: trig, exp/ln, powers. Trying to keep the final numbers small. I may have picked some other functions easier to check (to compare the accuracy). This one is pretty nasty. Anyway as I said I am interested in timings assuming that the calculators are as precise as they could with the digits that they have.

I am really interested in what scientific calculators can do. I hope Eddie W. Shore sees this posts and contributes with a couple of models. Or jebem.

Some redditors helping - https://www.reddit.com/r/EngineeringStud...ur_trusty/

Duplicated for versioning. http://www.wiki4hp.com/doku.php?id=bench...g_exp_root
Second duplication if wiki4hp is not reachable: https://osdn.net/users/pier4r/pf/various...chmark.txt

Mobile devices with programming apps having math libraries
max = 1'000'000
~ 5.22s - Nintendo New 2DS XL (2017) with SmileBasic A=1395612.15872538 post #159

max = 100'000
~ 0.52s - Nintendo New 2DS XL (2017) with SmileBasic A=139560.97614105 post #159

Mobile devices with calculator apps
max = 1'000'000
~ 0.189s - ThetaCalc on iPhone 12 Sum=1395612.1587253837 p#227
~ 9s - iPhone 12 DB48X v0.7.1 32-bit IEEE-754 p#248
~ 9s - iPhone 12 DB48X v0.7.1 32-bit IEEE-754 p#248

max = 100'000
~ 7.9s - Free42 iphone SE and 6s http://www.hpmuseum.org/forum/thread-975...l#pid94029
~ 17.3s - Emu48 HP50 on Samsung S20 userRPL p#216
~ 32s - Emu48 HP50 on Samsung S9+ userRPL p#213

max = 10'000
~ 3.2925s - Emu48 using flat HP50 on Samsung S9+ userRPL 13955.8578444 p#212
~ 3.29s - Emu48 HP50 on Samsung S9+ userRPL p#213

max = 1000
~ 0.3s Emu48 HP50 on Samsung S9+ userRPL p#213

Results physical calculators

max = 10'000'000
~ 84.1s - HP Prime G2 V.14603 Python p#239
~ 103.724s - Prime using python p#238

max = 1'000'000
~ 8.4s - HP Prime G2 V.14603 Python p#239
~ 10.381s - Prime using python p#238
~ 14.046s - Prime G2 Beta 2.1.14549 using Python 1395612.158725383 p#221
~ 605s - DM42 DB48X v0.7.1 32-bit IEEE-754 p#248
~ 806s - DM42 DB48X v0.7.1 32-bit IEEE-754 p#248
~ 1748s - DM32 DB48X v0.7.1 32-bit IEEE-754 p#248
~ 2188s - DM32 DB48X v0.7.1 64-bit IEEE-754 p#248

max = 500'000
~ 3.5s - Prime G2 summation built in post #178 (this seems suspicious though, maybe simplifications happening?)
~ 8s - Prime A summation built in post #178 (this seems suspicious though, maybe simplifications happening?)
~ 1125s - TI-30X Pro MathPrint summation built-in post #178
~ 6300s - TI 36X Pro summation built-in post #178

max = 100'000
~ 0.84s - HP Prime G2 V.14603 Python p#239
~ 1.038s - Prime using python p#238
~ 1.425s - Prime G2 Beta 2.1.14549 using Python 139560.9761410521 p#221
~ 7.7s - HG-Prime G2 , sum function http://www.hpmuseum.org/forum/thread-975...#pid102818
~ 9s - TI Nspire CX CAS, hardware version N-0118AB (2018), OS 4.5.0.1180 (2017): C with Ndless. Post #147
~ 9.5s - TI Nspire CX II CAS 13955.8579044; Sum function; original f(x); HW Rev. M-0119AF; OS 5.1.0.177 p#185
~ 12s - TI Nspire CX CAS, hardware version P-0411A (2011), OS 4.5.0.1180 (2017): 139560,97614105 . C with Ndless. Post #143
~ 17.7s - casio fx 9860GII power graphic 2 SHA4 overclock 236 +Ftune F5 preset C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 19.2s - HP-Prime , Home, Teval(), HP PPL. last os as 2017.12
~ 19.5s - TI nspire CX II CAS M-0720AK (2020), OS 5.2.0.771 (2020) micropython 139560.9761410522 p#205
~ 20.5s - casio fx cg50 SH4A 192MHz ptune C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.97614105
~ 23s - HP 50g HPGCC 2.0 - 75 Mhz - 139560.8013952589
~ 29.9s - casio fx cg20 SH4A 118MHz C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 36s - casio fx cg50 SH4A 118MHz C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 47s - TI Nspire CX CAS, hardware version P-0411A (2011), OS 4.5.0.1180 (2017): Lua max= 100000: 47.1s - 139560,97614105 . Post #143
~ 51.5s - TI Nspire CX II CAS: 139560.976284; Sum function and CAS simplified f(x) - f(x) = e^(x/(3*sqrt(x^2+1))) p#185
~ 54.5s - TI Nspire CX II CAS 139560.976284; Sum function and ^1/3 power instead of cube root p#185
~ 52s - casio fx 9860GII SH3 overclock 118MHz +Ftune F5 preset C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 53s - casio fx-cg50 micropython 139560.9761410521 http://www.hpmuseum.org/forum/thread-975...#pid103457
~ 57s - casio fx-cg50 micropython 139560.9761410521 http://www.hpmuseum.org/forum/thread-975...#pid103448
~ 65s - numworks 139560.97614110521 micropython http://www.hpmuseum.org/forum/thread-975...#pid103445
~ 84s - numworks 2017.12 micropython
~ 94s - TI Nspire CX II CAS 139560.976284; Sum function and cube root; HW Rev. M-0119AF; OS 5.1.0.177 p#185
~ 95s - TI nspire CX II CAS M-0720AK (2020), OS 5.2.0.771 (2020) Sum function, approx. mode 139561 p#205
~ 117s - casio fx 9860GII power graphic 2 SHA4 normal 29Mhz C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 147s - casio fx 9860GII SH3 normal 29 mhz C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,100000) - 139560.976141052
~ 176s - HP 39gii Program with For loop p#188
~ 195s - Nspire CX sum function approx mode.
~ 222s - nspire CX CAS, sum function, approx mode.
~ 261s - DM42 on USB, RPN
~ 323s - 9750gII upgraded to 9860gII OS {sum:eqn,x,1, 100000} gives me 139560.9761 CPU frequency sitting at 235 MHz (F5 in FTune)
~ 653s - DM42 on batteries, RPN
~ 2009s - 9750gII upgraded to 9860gII OS {sum:eqn,x,1, 100000} gives me 139560.9761
~ 7080s - casio fx-570EX, 139560.9761 sum function p#206 p#207

max = 10'000
~ 0.101s - Prime using python p#238
~ 0.159s - Prime G2 Beta 2.1.14549 using Python 13955.857904429155 p#221
~ 0.74s - HP-Prime G2 , sum function http://www.hpmuseum.org/forum/thread-975...#pid103311
~ 0.74s - Prime G2 HPPL p#209
~ 0.93s - Prime G2 HPPL p#209
~ 1.8s - casio fx 9860GII power graphic 2 SHA4 overclock 236 +Ftune F5 preset C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 2.072s - HP-Prime , Home, Teval(), HP PPL. last os as 2017.12
~ 2s - HP 50g HPGCC 2.0 - 75 Mhz - 13955.85790429154
~ 2.1s - casio fx cg50 SH4A 192MHz ptune C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 3.1s - casio fx cg20 SH4A 118MHz C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 3.8s - casio fx cg50 SH4A 118MHz C.BasicCG ver.0.45alpha Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 5.3s - casio fx 9860GII SH3 overclock 118MHz +Ftune F5 preset C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 8s - numworks 2017.12 python
~ 11.9s - casio fx 9860GII power graphic 2 SHA4 normal 29Mhz C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 12.5s - USB db48x for the dm42 https://www.hpmuseum.org/forum/thread-20...#pid174581
~ 14.9s - casio fx 9860GII SH3 normal 29 mhz C.Basic ver.1.73beta Sigma(Cbrte^sin tan^-1 X,X,1,10000) - 13955.8579042916
~ 16s - numworks 2017.12 sum function
~ 18s - HP 39gii Program with For loop p#188
~ 19s - nspire CX, sum function approx mode
~ 22.5s - nspire CX CAS, sum function, approx mode.
~ 20 sec - ti nspire handheld (2006). sum function. Degrees, float 12, approx. 13955.8579044 . OS 3.9.0.463
~ 23.9s - HP-Prime , Home, sum function. last os as 2017.12
~ 26s - DM42 on USB, RPN
~ 32s - 9750gII upgraded to 9860gII OS {sum:eqn,x,1,10000} gives me 13955.8579 CPU frequency sitting at 235 MHz (F5 in FTune)
~ 56,51s - Hp 50g newRPL 2017.12 FOR loop., 12 digits precision
~ 65.73s - DM42 on batteries, RPN
~ 97s - HP Xpander built in function 13955.8579043 p#210
~ 184s - fx9860GIII , micropython result has reduced precision p#199
~ 199s - 9750gII upgraded to 9860gII OS {sum:eqn,x,1,10000} gives me 13955.8579
~ 233s - casio fx 9860gII, sum function
~ 242s - hp 50g, sum function . It uses CAS to simplify the expression! See post #144.
~ 257s - HP-200LX turbo c 2.01, 13955.857904 p#236
~ 260s - hp 50g, sysRPL
~ 309s - hp 50g, userRPL
~ 330s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned off, post#165 13955.8579042908
~ 376s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned on, post#165 13955.8579042908
~ 402.91s - TI 84 Plus CE
~ 453s - Ti 92 plus, sum function
~ 465s - ti 89, approx mode, sum function.
~ 468s - 41CL, v5 board, TURBO 50. Using the Sigma+ function to accumulate intermediate values. 13955.84859
~ 472s - ti 89 titanium, 12 digits, approx mode, degrees, no pretty print. OS 3.10 (code sigma((e^(...))^(1/3), x, 1, 1000)) where 'sigma' is the greek letter . 13955.8579044
~ 487.3s - HP 49G (ROM 2.10) radians real approx sum function (uses CAS see post #144) - 13955.8578444 p#185
~ 487.3s - HP 49G (ROM 2.10) degrees real approx sum function (uses CAS see post #144) - 13955.8578444 p#185
~ 505.4s - HP 49G (ROM 2.10) radians real approx UserRPL FOR/NEXT - 13955.8578444 p#185
~ 534.7s - HP 49G (ROM 2.10) degrees real approx UserRPL FOR/NEXT - 13955.8578444 p#185
~ 541s - hp 48gx, userRPL
~ 554s - hp 48gx, sum function
~ 986s - Ti 92, sum function
~ 1073s - casio fx-570EX, 13955.8579 sum function p#206 p#207
~ 1105s - casio fx 9750g, sum function
~ 1184s - DM11L (48 mhz), RPN
~ 1185s - Ti 82, ti basic
~ 1246s - hp28s, userRPL
~ 1501s - casio fx880p, casio basic
~ 1650s - fx9860GIII , Casio Basic p#199

max = 1000
~ 0.036s - Prime G2 Beta 2.1.14549 using Python 1395.3462877433426 p#221
~ 0.223s - HP-Prime , Home, Teval(), HP PPL. last os as 2017.12
~ 0.4s - DM42 DB48X v0.6.4 32-bit IEEE-754 p#248
~ 0.7s - DM42 DB48X v0.6.4 32-bit IEEE-754 p#248
~ 1.4s - DM32 DB48X v0.6.4 32-bit IEEE-754 p#248
~ 1.7s - DM32 DB48X v0.6.4 64-bit IEEE-754 p#248
~ 2s - HP-Prime , Home, sum function. last os as 2017.12
~ 2s - HP 39gii Built-in sum function (sum function can only do max. 1000) p#188
~ 2.5s - nspire CX CAS, sum function, approx mode.
~ 2.6s - DM42 on USB, RPN
~ 4s - casio fx-9750gII (upgraded with 9860gII OS 2.04) and overclocked to max speed with FTune (likely a ~ 5x overclock) sum function
~ 6.022s - Hp 50g newRPL 2017.12 FOR loop., 12 digits precision
~ 6.5s - Casio fx-CP400 (classpad 400) , 1395.346288 sum function
~ 6.64s - DM42 on batteries, RPN
~ 7s - fx9860GIII with OS version 3.70.0200 mycropython p#245
~ 8.2s - Hp 50g newRPL 2017.12 FOR loop., 32 digits precision 1395.346287743423 (I assume the result returned truncated on the stack)
~ 12s - HP Xpander built in function 1395.34628774 p#210
~ 12.582s - HP-Prime , CAS, approx mode. last os as 2017.12
~ 13.5s - Casio fx-CG50 (primz), 1395.346288 sum function
~ 18s - Casio ClassPad 330-A, 1395.346288 (ClassPad is labeled on the back side as CLASSPAD300PLS, the 330-A is written on the box) sum function
~ 18s - fx9860GIII , micropython result has reduced precision p#199
~ 20s - Casio fx-7400GII , 1395.346288 sum function
~ 22s - casio fx-9750gII (upgraded with 9860gII OS 2.04), 1395.346288 sum function
~ 23s - casio fx 9860gII, sum function
~ 23s - Casio fx-9860G Slim (hacked to 9860GII OS 2.04), 1395.346288 sum function
~ 24.5s - Hp 50g, 2.15, RPN mode, DEG, sum function . 1395.3462877 (approx mode). It uses CAS to simplify the expression! See post #144.
~ 24.5 - CASIO Prizm fx-CG10, sum function
~ 25.5s - Hp 50g, 2.15, exact mode sum function. It uses CAS to simplify the expression! See post #144.
~ 25.5s - Hp50g RPN; Sum function; Std number format; ~Num key; 1395.3462877 p#185
~ 26.5s - hp 50g, sysRPL
~ 27s - HP-200LX turbo c 2.01, 1395.346288 p#236
~ 29.4s - Hp 50g newRPL 2017.12 FOR loop., 128 digits precision
~ 29s - HP15C LE
~ 33.8s - Hp 50g, 2.15, RPN mode, DEG (quick userRPL FOR loop, using, instead of XROOT, the 1/3 power. Surprisingly slower than the summation) . 1395.3462877 (approx mode)
~ 34s - HP-40gs sum function, 1395.3462877
~ 34.8s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned off, post#165 1395.34628774339
~ 38s - sharp el-9950 , 1395.346288
~ 39.7s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned on, post#165 1395.34628774339
~ 41.5s - TI 84 plus CE
~ 45s - Ti 92 plus, sum function
~ 46s - ti 89 titanium, 12 digits, approx mode, degrees, no pretty print. OS 3.10 (code sigma((e^(...))^(1/3), x, 1, 1000)) where 'sigma' is the greek letterl . 1395.34628774
~ 46s - ti 89, approx mode, sum function.
~ 47.8s - HP 49G (ROM 2.10) radians real approx sum function (uses CAS see post #144) - 1395.3462877 p#195
~ 47.8s - HP 49G (ROM 2.10) degrees real approx sum function (uses CAS see post #144) - 1395.3462877 p#195
~ 48s - ti 89 titanium, 12 digits, approx mode, degrees, no pretty print. OS 3.10 (code sum(seq((e^(...))^(1/3), x, 1, 1000))) . 1395.34628774
~ 48s - 41CL, v5 board, TURBO 50. Using the Sigma+ function to accumulate intermediate values. 1395.346260
~ 51.0s - HP 49G (ROM 2.10) radians real approx UserRPL FOR/NEXT - 1395.3462877 p#195
~ 53.9s - HP 49G (ROM 2.10) degrees real approx UserRPL FOR/NEXT - 1395.3462877 p#195
~ 54s - hp 48gx, userRPL
~ 55s - hp 48gx, sum function
~ 55s - 48G+ , sum function with speed ui
~ 57s - TI Voyage 200 Sum function; 12 digits; "Approx ="; 1395.34628774 p#185
~ 57s - Casio fx-991CW , 1395.346288 p#237
~ 59s - casio fx-570CW, 1395.346288 (sum function) p#235
~ 62s - ti 89 OS 2.09. (exact mode plus likely with pretty print)
~ 64s - sharp el-w506x (abusing the integral function).
~ 76s - Casio fx-9700GE , 1395.34628774 sum function
~ 95.5s - HP 48SX http://www.hpmuseum.org/forum/thread-975...#pid103329
~ 97s - sharp el-506x (abusing the integral function).
~ 99s - Ti 92, sum function
~ 99.5s - casio fx-9750g+ sum function
~ 102s - Sharp PC-G850VS Basic, 1395.346559
~ 103s - casio fx 9750g, sum function
~ 104s - TI-30X Pro MathPrint 1395.346288 post #156
~ 104s - TI-30X Pro MathPrint (Europe) 1395.346288 post #237 (confirmed!)
~ 105s - TI-83plus (ver.1.16) internal result=1395.346287744 post #161
~ 108s - casio fx991 version , 1395.346288 (the fast batch reported by some users) sum function
~ 109s - casio fx-570EX, 1395.346288 sum function p#206 p#207
~ 115s - TI-82 - 0497 Date Code Result=1395.346288 p#211
~ 120s - DM10L (48 mhz), RPN post#170
~ 120s - HP-27S 1395.3462877 BENCH=Σ(X:1:1000:1:EXP(SIN(ATAN(X)))^.333333333333)
~ 121s - Ti 82, ti basic
~ 123s - HP-28S userRPL p#213
~ 125s - DM11L (48 mhz), RPN
~ 130s - hp28s, userRPL
~ 131s - casio fx991 version , 1395.346288 (the slow batch reported by some users) sum function
~ 131s - TI-85 (ver.9.0) internal result=1395.346287744 post #161
~ 133s - 136s - DM15L , 48 mhz (interesting the difference with the 41L), 1395.346288
~ 135s - Casio fx-991EX , sum built in, 1395.3463 post #180
~ 136s - TI-85 nested Sum(Seq(f(x),x,1,1000,1)); Mode defaults; 1395.34628774 p#185
~ 138s - TI-86 nested Sum(Seq(f(x),x,1,1000,1)); Mode defaults; 1395.34628774 p#185
~ 145s - Sharp el-5250 (program with Lbl-conditional-Goto) p#188
~ 148s - HP 75D http://www.hpmuseum.org/forum/thread-975...l#pid88453
~ 153s - casio fx880p, casio basic. Another run 158s (see post #76).
~ 163s - Casio fx-92+ Spéciale Collège 1395,346288 http://www.hpmuseum.org/forum/thread-975...#pid103296
~ 164s - fx9860GIII , Casio Basic p#199
~ 166s - Casio fx-5800P, 1395.346288 sum function
~ 168s - WP 34S double off, fix 2, sum function
~ 173s - Epson Hx-20 . max 7 digits precision. 1395.36
~ 173s - Epson Hx-20 . max 16 digits precision. 1395.346369147301
~ 171-178s - HP 71B http://www.hpmuseum.org/forum/thread-975...l#pid88453 - http://www.hpmuseum.org/forum/thread-975...l#pid90635
~ 185s - WP 34S double on, fix 2, sum function
~ 200s - casio fx8500g, sum function
~ 206s - HP 32s RPN 1395.34628770 http://www.hpmuseum.org/forum/thread-975...l#pid89004
~ 209s - HP 33s RPN http://www.hpmuseum.org/forum/thread-982...l#pid87566
~ 218s - Ti 80, ti basic
~ 220s - fx9860GIII , built in sum p#199
~ 241s - HP 32sII RPN 1395.34628770
~ 245s - TI 36x Pro sum function
~ 253s - Hp 35s http://www.hpmuseum.org/forum/thread-982...l#pid87766
~ 256s - wp34s (DSE-based loop, DBLOFF), 1395.346287743423
~ 285s - wp34s (DSE-based loop, DBLON), 1395.346287743423256291575365067091
~ 287s - Hp35s, RPN program
~ 291s - HP 42s , RPN program
~ 298s - sharp el-506w (abusing the integral function. Not really returning the wanted result from the summation).
~ 303s - wp34s (S command, DBLOFF), 1395.346287743423
~ 332s - wp34s (S command, DBLON), 1395.346287743423256291575365067093
~ 338s - casio fx-4000P 1395.346288 http://www.hpmuseum.org/forum/thread-975...#pid102725
~ 375s - HP9821A, algebraic post#177
~ 390s - HP9821A, algebraic, 1395.346288 post#173
~ 404.93s - DM41L 48 mhz , RPN program
~ 502.2s - Sharp 516X sum function
~ 525s - Casio fx-115ES Plus: 1395.346288 sum function
~ 573s - fx-3600pv degrees 1395.3462707 p#203
~ 574s - fx-3600pv radians 1395.3462707 p#203
~ 581s - casio fx-570CW, 13955.8579 (sum function) p#235
~ 633s - Casio fx-3650pII , 1395.346288 for next
~ 633s - Casio fx-50F PLUS , 1395.346288 for next
~ 840-890s - Canon X Mark I Pro, 1395.346288, sum function
~ 1814s - Casio fx-50F degrees 1395.34628605 p#198
~ 1828s - Casio fx-50F radians 1395.34628605 p#198
~ 2844s - Sharp PC-1201 p#228

max = 100
~ 0.036s - HP-Prime , Home, Teval(), HP PPL. last os as 2017.12
~ 0.2s - HP-Prime , Home, sum function. last os as 2017.12
~ 0.28s - DM42 on USB, RPN
~ 0.6s - DM42 on batteries, RPN
~ 2s - fx9860GIII , micropython result has reduced precision p#199
~ 2.5s - casio fx 9860gII, sum function
~ 2.7s - hp 50g, sum function. It uses CAS to simplify the expression! See post #144.
~ 2.8s - hp 50g, sysRPL
~ 3.3s - hp 50g, userRPL
~ 3.77s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned off, post#165 139.297187045924
~ 3.85s - DM41X FOCAL stack, USB connected p#201
~ 4s - ti 89, approx mode, sum function.
~ 4s - HP-200LX turbo c 2.01, 139.297187 p#236
~ 4.3s - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned on, post#165 139.297187045924
~ 4.61s - DM41X FOCAL fast mode, USB connected: result=139.2971873 p#200
~ 5s - Ti 92 plus, sum function
~ 5.5s - HP 49G (ROM 2.10) radians real approx sum function (uses CAS see post #144) - 139.297187047 p#195
~ 5.5s - HP 49G (ROM 2.10) degrees real approx sum function (uses CAS see post #144) - 139.297187047 p#195
~ 5.5s - HP 49G (ROM 2.10) radians real approx UserRPL FOR/NEXT - 139.297187047 p#195
~ 5.7s - HP 49G (ROM 2.10) degrees real approx UserRPL FOR/NEXT - 139.297187047 p#195
~ 5.13s - 41CL, v5 board, TURBO 50. Using the Sigma+ function to accumulate intermediate values. 139.297187
~ 5.5s - hp 48gx, userRPL
~ 5.9s - hp 48gx, sum function
~ 6s - 48G+ , sum function with speed ui
~ 7s - casio fx-570CW, 139.297187 (sum function) p#235
~ 10s - Ti 92, sum function
~ 11s - casio fx 9750g, sum function
~ 11s - Sharp PC-G850VS Basic, 139.2971873
~ 11s - TI-30X Pro MathPrint 139.2971870 post #156
~ 11s - casio fx991 version , 139.2971870 (the fast batch reported by other users) sum function
~ 12s - DM41X FOCAL stack, battery p#201
~ 12s - casio fx-570EX, 139.297187 sum function p#206 p#207
~ 13s - Ti 82, ti basic
~ 13.2s - HP-28S userRPL p#213
~ 14s - DM11L (48 mhz), RPN
~ 14s - dm15L 48 mhz, RPN, 139.2971874
~ 14s - casio fx991 version , 139.2971870 (the slow batch reported by other users) sum function
~ 14s - hp28s, userRPL
~ 14.33s - DM41X FOCAL fast mode, battery powered: result=139.2971873 p#200
~ 15s - HP-41CL / x50 speed: 100 iterations (139.2926) RPN
~ 16s - casio fx880p, casio basic
~ 16s - fx9860GIII , Casio Basic p#199
~ 17s - Casio FX603P, casio basic
~ 18s - Epson Hx-20 . max 7 digits precision. 139.297
~ 18s - Epson Hx-20 . max 16 digits precision. 139.297193646431
~ 21s - casio fx8500g, sum function
~ 22s - sharp el-9300 http://www.hpmuseum.org/forum/thread-975...l#pid89345
~ 23s - HP 33s RPN http://www.hpmuseum.org/forum/thread-982...l#pid87566
~ 23s - HP 32s RPN 139.29718705 http://www.hpmuseum.org/forum/thread-975...l#pid89004
~ 23s - Ti 80, ti basic
~ 25s - TI 36x Pro
~ 25s - fx9860GIII , built in sum p#199
~ 26s - wp34s (DSE-based loop, DBLOFF), 139.2971870459241
~ 26s - HP 32sII RPN 139.29718705
~ 27s - wp34s (DSE-based loop, DBLON), 139.2971870459242385751150019615150
~ 27.5s - Hp 35s http://www.hpmuseum.org/forum/thread-982...l#pid87766
~ 30s - wp34s (S command, DBLOFF), 139.2971870459242
~ 31s - HP 42s , RPN program (confirmations: post #149 Result: 139.297187046 )
~ 31s - Hp35s, RPN program
~ 33.8s - Sharp 516X
~ 34s - wp34s (S command, DBLON), 139.2971870459242385751150019615149
~ 36s - Sharp EL-5120 Solver 139.297187 http://www.hpmuseum.org/forum/thread-975...l#pid88303
~ 37s - HP9821A, algebraic post#177
~ 38s - HP9821A, algebraic, 139.2971870 post#173
~ 42.23s - DM41L 48 mhz , RPN program
~ 43 - 44 s - Casio fx-720P 139.297187038 http://www.hpmuseum.org/forum/thread-975...#pid102799 see also post #153
~ 45s - CASIO PB 700 - BASIC Result: 139.297187 post #153
~ 58.9s - fx-3600pv degrees 139.2971869 p#203
~ 63s - dm15L 12mhz , RPN, 139.2971874
~ 65s - Casio fx-991ES PLUS sum function
~ 66s - HP9100B , algebraic 139.2971870 - post #177
~ 83s - TI-95 Procalc, program "assembled" 139.2971870460 p#189
~ 88s - Casio fx-4500p released 1989 program 139.297187 p#220
~ 91s - Sharp PC-1401 Basic, 139.2971873
~ 91s - Olivetti M10, basic
~ 91s - CASIO FX-602P - KEYSTROKE PROGRAM Result:139.2971873 post #149
~ 105s - TI-67 released 1992 sum func 139.297187 p#220
~ 146s - TI-67 released 1992 program 139.297187 p#220
~ 158s - hp 41CV (plain, fullnut, no turbo) , 139.2971874
~ 158s - Casio fx-2700P 139.29719 http://www.hpmuseum.org/forum/thread-975...l#pid91994
~ 182s - CASIO FX-502P - Keystroke program (DSZ loop) post #164 139.2971870
~ 187.1s - Casio fx-50F 139.297187029 p#198
~ 285s - Sharp PC-1201 p#228
~ 313 - 320s - hp15C , RPN , 139.2971874
~ 316s - HP-11C - RPN PROGRAM Result: 139.2971874 post #149
~ 316s - HP-10C - RPN PROGRAM Result: 139.2971874 post #151
~ 329s - hp-65 N=100, Result= 139.2971873
~ 340s - HP-67. RPN (139.2925695)
~ 419s - TI-57 II - keystroke program (DSZ loop), 139.29719 p#197
~ 434s - HP 55 , RPN program 139.2971873

max = 10
~ 1< seconds - Hp 50g, 2.15, RPN mode 13.7118350167 (approx mode). It uses CAS to simplify the expression! See post #144.
~ 1s< - Saturn assembly for the HP48G/GX ( ROM version R ), Display and keyboard scanning turned on (or off), post#165 13.7118350167043
~ 1s - casio fx-570CW, 13.71183502 (sum function) p#235
~ 2s - Epson Hx-20 . max 7 digits precision. 13.7118
~ 2s - Epson Hx-20 . max 16 digits precision. 13.71183562278748
~ 2s - casio fx-570EX, 13.71183502 sum function p#206 p#207
~ 2s - HP-200LX turbo c 2.01, 13.711835 p#236
~ 3s - wp34s (DSE-based loop, DBLOFF), 13.71183501670439
~ 3s - wp34s (DSE-based loop, DBLON), 13.71183501670437880652763283584306
~ 3s - wp34s (S command, DBLOFF), 13.71183501670438
~ 3s - wp34s (S command, DBLON), 13.71183501670437880652763283584306
~ 3s - HP 32s RPN 13.71183502 http://www.hpmuseum.org/forum/thread-975...l#pid89004
~ 3s - HP 32sII RPN 13.71183502
~ 3.5s - HP 42S - RPN PROGRAM Result: 13.7118350166 post#149
~ 4s - HP9821A, algebraic, post #177
~ 4s - HP9821A, algebraic, 13.71183502 post#173
~ 4s - Casio fx-720P 13.7118350167 http://www.hpmuseum.org/forum/thread-975...#pid102799 see also post #153
~ 4.6s - CASIO PB 700 - BASIC Result: 13.71183502 post #153
~ 6s - dm15C 12mhz , RPN, 13.71183502
~ 6s - fx-3600pv degrees 13.711835009 p#203
~ 6.5s - HP9100B , algebraic 13.71183502 - post #177
~ 9s - Sharp PC-1401 Basic, 13.71183501
~ 9.2s - CASIO FX-602P - KEYSTROKE PROGRAM Result:13.71183502 post #149
~ 9.5s - Olivetti M10, basic
~ 9s - Casio fx-4500p released 1989 program 13.71183502 p#220
~ 11s - TI-67 released 1992 sum func 13.71183502 p#220
~ 14s - TI-59 Result: 13.71183502 p#183
~ 15s - TI-67 released 1992 program 13.71183502 p#220
~ 16s - TI-58c Result: 13.71183502 p#183
~ 16s - hp 41CV (plain, fullnut, no turbo), 13.71183502
~ 16s - Casio fx-2700P 13.711835 http://www.hpmuseum.org/forum/thread-975...l#pid91994
~ 18.1s - CASIO FX-502P - Keystroke program (DSZ loop) post #164 13.71183501
~ 18.7s - Casio fx-50F 13.7118350165 p#198
~ 25s - Sharp PC-1201 p#228
~ 29s - HP-25C (Woodstock): N=10, Result=13.71183501
~ 31s - HP-11C - RPN PROGRAM Result: 13.71183502 post #149
~ 31s - HP-10C - RPN PROGRAM Result: 13.71183502 post #151
~ 32s - hp15C , RPN, 13.71183502
~ 32s - hp-65, Time= 32 sec, Result= 13.71183501
~ 33s - HP-97 - RPN PROGRAM Result: 13.71183502 post #149
~ 35s - HP-29C (Woodstock) N=10, Result=13.71183501
~ 39s - TI-57 II - keystroke program (DSZ loop), 13.711835 p#197
~ 43s - HP 55 , RPN program 13.71183501
~ 44s - HP-33C (Spice): N=10, Result=13.71183501 http://www.hpmuseum.org/forum/thread-975...l#pid88370
~ 46s - HP-34C (Spice): N=10, Result=13.71183501
~ 47s - sharp 506w (using X, formula memory F4 and M to sum) manually. 13.71183502 .
~ 51s - TI-57 Result: 13.711835 p#183
~ 56s - TI-53 "... at a rate of one iteration every 5.64 seconds. " http://www.hpmuseum.org/forum/thread-975...l#pid87729
~ 63.5s - TI-62, TI basic. 13.71183502
~ 99s - MK 54 , RPN program 13.711835
~ 100s - MK 61 , RPN program 13.711835
~ 110s - MK 56 , RPN program 13.711835

PS: I forgot how full of apps was the ti89 and how awful is the official command reference compared to the 50g AUR. But with the ti89 one finds everything online. Ex: https://education.ti.com/html/t3_free_co...sson2.html

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-22-2017, 10:18 PM (This post was last modified: 12-22-2017 10:22 PM by Arno K.)
Post: #3
RE: Summation based test for calculators
I ususally am not that enthusiastic about these tests, but nevertheless I entered the sum on the HW-Prime, in CAS, time() said 12.582s, the result is, approx() used, 1395.34628774. Without approx it returns that sum of exact values. Then I switched to home, here the same commands needed 15.702s, which is some overhead produced by time, with TEVAL() only 0.223s were used to get the result you had.
Arno
Find all posts by this user
Quote this message in a reply
12-22-2017, 11:10 PM (This post was last modified: 12-22-2017 11:11 PM by pier4r.)
Post: #4
RE: Summation based test for calculators
(12-22-2017 10:18 PM)Arno K Wrote:  I ususally am not that enthusiastic about these tests

Yes they are nothing special, but they give an idea and moreover it is the first time I see the possibility to compare with scientific calculators (at least the last generation). Plus the formula is pretty easy to type. I did it on the ti89 and nspire that I almost never touch.

If I understood correctly, the 0.223s where obtained in the home using Teval(). Could you run with the same setup a test until 10k ?

I hope someone with a new dm42 does the test too. As well as some casio devices.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 12:57 AM
Post: #5
RE: Summation based test for calculators
(12-22-2017 09:41 PM)pier4r Wrote:  I did not forget this post (nor the topic about common calculators).

So as said the summation based test will be very similar to the savage benchmark and I wonder how many similar tests were developed on various forum or groups regarding calculators.

Anyway, inspired by the test done in the thread of Eddie linked in the 1st post, I decided to pick randomly some scientific functions to assemble a summation that may give an idea of the performances of a calculator for common math functions.

The idea is to have a loop working on an incrementing 'x' value that is somewhat independent from the step before (while the savage test uses the value picked from the step before) . Furthermore while the idea of using a function and its inverse is pretty neat (see savage benchmark), some calculators may be very carefully coded figuring this out and therefore simplifying the expression.

I am not that interested in the accuracy, as it is well analyzed in many other posts using other examples (especially by Dieter, that for me will always be the ULPs man).

Surely speed without accuracy is not that neat and so one could go on and build a metric that weights accuracy and speed, as done by a recent HHC (about egyptian fractions), anyway I will collect only timings.

Timings will be collected here, and then moved on the wiki4hp if there are enough of them.

People are encouraged to post timings and results.

So to recap the idea of this test is there because:
- with a summation with increasing x (not dependent on the previous computed value) also some advanced scientific calculators can be tested. See casio fx991EX.
- it is easier to type in and execute. It does not take much time (well unless one is forced to write a program to optimize some parts).
- it may be used with a metric that combines speed and accuracy (a problem would be to get the right accuracy for the problem).
- it avoids to use a function and its inverse to skip very careful optimizations done by the parser. (especially systems with CAS may use this)


Here is the assembled formula (I guess there can be an infinity of formulas that capture the idea I am going to expose).

\[ tan^{-1}(x) \]
So x can be incremented without problems. Picked among the trigonometric functions.

\[ sin \left (tan^{-1}(x) \right ) \]
To let the value increase towards 1, although, after a while, very slowly. Still trig.

\[ e^{ sin \left (tan^{-1}(x) \right ) } \]
to use either a common exponential or a logarithmic function without producing large numbers

\[ \sqrt[3]{e^{ sin \left (tan^{-1}(x) \right ) }} \]
To make the final number even smaller. Using powers.

Final formula to use (adapt the max 'x' value for speedy calculators. For example using 10k or 100k and so on)
\[ \sum_{x=1}^{1000} \sqrt[3]{e^{ sin \left (tan^{-1}(x) \right ) }} \]

As said, it is an arbitrary formula picking functions among some of the most common types of functions: trig, exp/ln, powers. Trying to keep the final numbers small. I may have picked some other functions easier to check (to compare the accuracy). This one is pretty nasty. Anyway as I said I am interested in timings assuming that the calculators are as precise as they could with the digits that they have.

I am really interested in what scientific calculators can do. I hope Eddie W. Shore sees this posts and contributes with a couple of models. Or jebem.

Results

max = 10000
1. ~ 20 sec - ti nspire handheld (2006). Degrees, float 12, approx. 13955.8579044 . OS 3.9.0.463

max = 1000
~ 0.223s - HW-Prime , Home, Teval().
~ 12.582s - HW-Prime , CAS, approx mode.
~ 24.5 seconds - Hp 50g, 2.15, RPN mode, DEG (done with the beautiful eq matrix and then EVAL. TEVAL did not help) . 1395.3462877 (approx mode)
~ 33.8 sec - Hp 50g, 2.15, RPN mode, DEG (quick userRPL FOR loop, surprisingly slower than the summation) . 1395.3462877 (approx mode)
~ 48 secs - ti 89 titanium, 12 digits, approx mode, degrees. OS 3.10 (code sum(seq((e^(...))^(1/3), x, 1, 1000))) . 1395.34628774

max = 10
1. 1< seconds - Hp 50g, 2.15, RPN mode 13.7118350167 (approx mode)
2. ~ 47 seconds - sharp 506w (using X, formula memory F4 and M to sum) manually. 13.71183502 . I did not yet found out what is the equivalent of the summation if I abuse the integration function. (that should use the trapezoidal rule)

PS: I forgot how full of apps was the ti89 and how awful is the official command reference compared to the 50g AUR.

Casio fx-115ES Plus: 1395.346288, time 8 minutes and 45 seconds
Visit this user's website Find all posts by this user
Quote this message in a reply
12-23-2017, 06:32 AM (This post was last modified: 02-03-2018 07:49 PM by brickviking.)
Post: #6
RE: Summation based test for calculators
On the HP-50G, I entered the formula into the Equation writer, popped it to the stack and hit EVAL. I get about 28.2" in exact mode and about 25.5" in Approx mode, giving a result of 1395.3462877 in both cases. I'm assuming that's the way I'm meant to do it? I also duplicated these results using ->NUM just to check, but got roughly the same measurements. EVAL in the equation editor also got a similar result to using EVAL on the stack entry.

It's interesting that my fx-9750gII (upgraded with 9860gII OS 2.04) beats out the 50G. My fx-9750gII gets about 22" for sum(1,1000) giving me 1395.346288 as a result. Then I tried it out on the fx-9750g+ (earlier generation) and got 1' 39.5". Just for laughs, I "souped up" the 9750gII with the FTune application (speeds up the CPU and bus clock) and got four seconds for 1,1000. Wow. I wonder what I'd get if I'd newRPL'd the 50G?

(Post 148)

BrickEdit: added gII to last instance of 9750, as it wasn't clear which machine I souped up. Could be a laugh trying to "soup up" the G+.

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
12-23-2017, 07:56 AM
Post: #7
RE: Summation based test for calculators
You do realise that you are basically repeating the same calculation thousands of times?

The atan will quickly converge to pi/2 and so the summand to exp(1/3).
Find all posts by this user
Quote this message in a reply
12-23-2017, 09:05 AM
Post: #8
RE: Summation based test for calculators
(12-22-2017 11:10 PM)pier4r Wrote:  
(12-22-2017 10:18 PM)Arno K Wrote:  I ususally am not that enthusiastic about these tests

Yes they are nothing special, but they give an idea and moreover it is the first time I see the possibility to compare with scientific calculators (at least the last generation). Plus the formula is pretty easy to type. I did it on the ti89 and nspire that I almost never touch.

If I understood correctly, the 0.223s where obtained in the home using Teval(). Could you run with the same setup a test until 10k ?

I hope someone with a new dm42 does the test too. As well as some casio devices.

2.072s to get it to 10000.
Arno
Find all posts by this user
Quote this message in a reply
12-23-2017, 09:09 AM
Post: #9
RE: Summation based test for calculators
I've not tried this on the 34S and probably won't. The internal summation command will be slower than a short program that just adds the terms -- it goes to some extra effort to Kahan sum the terms in reverse order (which isn't ideal in this case).


Pauli
Find all posts by this user
Quote this message in a reply
12-23-2017, 09:59 AM (This post was last modified: 12-23-2017 10:28 AM by pier4r.)
Post: #10
RE: Summation based test for calculators
(12-23-2017 07:56 AM)AlexFekken Wrote:  You do realise that you are basically repeating the same calculation thousands of times?

The atan will quickly converge to pi/2 and so the summand to exp(1/3).

Yes, but the calculator should not know (although I am not sure what happens when x gets large and tan^-1 may report always the same value). Moreover as I wrote, the formula is pretty arbitrary and is one picked quickly that does not converge but also does not explode with larger values.

I was thinking about alternate series (using sin or cos) but at the end it would be similar. It is repeating thousands of times the same functions. At it is also what is wanted, so one gets an idea how those functions performs together, likely avoiding possible internal optimizations such as "a function and its inverse composed".

What is interesting is that with the 50g, in userRPL, I was not yet able to get a program faster than the summation. And the faster value is a summation, that is an algebraic object that is notoriously slower than pure userRPL!

Anyone with a 48 or other devices? Is it difficult to produce a RPN equivalent (for 41 and other systems) for the formula?

@Pauli: is it difficult to run an internal program on the 34s for this summation? If not, could you try?


edit: also newrpl should be interesting. Because the first second is done at 6 mhz and then the 50g switches to full 192 mhz according to what I read in the newRPL threads.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 11:38 AM (This post was last modified: 12-23-2017 11:43 AM by Gilles59.)
Post: #11
RE: Summation based test for calculators
NewRPL, precision 32 digits :

1000 Loop (FOR NEXT) : 8.2 sec
result : 1395.346287743423

12 digits = 6.022 sec
128 digits = 29.4 sec
Find all posts by this user
Quote this message in a reply
12-23-2017, 12:54 PM (This post was last modified: 12-23-2017 02:28 PM by pier4r.)
Post: #12
RE: Summation based test for calculators
Thanks gilles! Super neat.

Would be really nice to have the results (if possible with common entry mode and then in an optimized form, if it exists) for:
- a 41 version
- 41 CL
- dm41
- dm42
- hp 42s
- 35s
- a 48 version
- 12C (recent)
- 15C
- 50g with hpgcc (but this may be highly time consuming and not really usable in all day operations)
- 71B
- 67
- 34S
- Nspire CX
- A ti 84 (if possible recent)
- Casio primz
- Casio classpad (if possible 300 and then newer versions)
- casio 991ex
- Some sharp EL graphing or PC
- Also Nspire lua would be interesting (I can do it on the nspire handheld, although a CX should be better) but actually it would be very similar to a hpgcc version on the 50g, very unlikely to be used in all day operations since lua is clumsy to use on the nspire for actual math results.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 01:56 PM
Post: #13
RE: Summation based test for calculators
(12-23-2017 09:59 AM)pier4r Wrote:  I was thinking about alternate series (using sin or cos) but at the end it would be similar. It is repeating thousands of times the same functions.

I did not just mean "calling the same functions", but "calling the same functions with almost exactly the same (perhaps even the same) argument". I would say that any proper benchmark should call whatever functions it calls with a decent spread of the inputs. Using atan for (mainly) large values and then passing the almost constant result into sin (near an extremum!) pretty much garantees the exact opposite of that.

Just my 2c of course...
Find all posts by this user
Quote this message in a reply
12-23-2017, 02:27 PM (This post was last modified: 12-23-2017 03:05 PM by pier4r.)
Post: #14
RE: Summation based test for calculators
(12-23-2017 01:56 PM)AlexFekken Wrote:  I did not just mean "calling the same functions", but "calling the same functions with almost exactly the same (perhaps even the same) argument". I would say that any proper benchmark should call whatever functions it calls with a decent spread of the inputs. Using atan for (mainly) large values and then passing the almost constant result into sin (near an extremum!) pretty much garantees the exact opposite of that.

Just my 2c of course...

You also have a point. But for the objective of the test (not much accuracy, rather timing) I would suppose that whatever spread of the inputs would be more or less similar. If you have better compositions of functions (trig, exp/ln/, power, add/sub/mul/div ) let me know! It may be an interesting input to learn a thing or two.

At first I was exploring the hyperbolic functions (also because I never used them) but those may (a) be not so commonly implemented and (b) less often used.

Edit. Meanwhile I forced the sharp 506w to do a similar tasks like the summation using the integral calculation, although the result is off due to fixed coefficents.

The integral calculator in the sharp el-506w is done with the Simpson's rule:
[Image: 1VGLzjM.png]

This means that with a careful choice of the input parameters I can hope that the function is evaluated almost exactly in the 1000 points of the summation written above.
In particular:
a = 1
b = 1000
n = 500
N = 1000
h = 0.999
(if someone finds better parameters, please tell me!)

I do not know how the summation is done, but I assume that there are two internal registers for the sum of the "even" steps and the "odd" steps that then gets multiplied by 4 and 2. The computation is done in 4m 58s .

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 05:35 PM
Post: #15
RE: Summation based test for calculators
Interesting report from reddit.

Quote:TI-89 (Original, not Titanium) OS 2.09
10000, ~62s
1000, ~62s
100, ~36s

TI-89 Titanium OS 3.10
10000, ~65s
1000, ~65s
100, ~37s

I repeated the 10000 and 1000 tests on both of the above calculators multiple times because it seems weird to me that both 1000 and 10000 would take the same amount of time, but the results were the same.

I will have to check with my ti 89

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 07:21 PM
Post: #16
RE: Summation based test for calculators
summation test for n=1000
Casio fx-CG50 - approx 13.5s, 1395.346288
Casio fx-CP400 - approx. 6.5s, 1395.346288
Casio fx-991CE X - approx 1m 48s, 1395.346288
TI-Nspire CX CAS - after 47s resource exhaustion, cannot complete calculations,
Sharp EL-9950 - approx. 38s, 1395.346288
Find all posts by this user
Quote this message in a reply
12-23-2017, 08:48 PM
Post: #17
RE: Summation based test for calculators
Thanks for the answer!

Thanks to grsbanks that reported the first entry for the dm42. I asked him to check the results with the prime and 50g, because his devices are like 10x faster than the one reported by other users and by me.

The dm42 is pretty fast! I mean for a product done by a small company (compared to hp, ti, casio, sharp) plus one external indivisual (T.Okken) is quite amazing!

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 08:49 PM
Post: #18
RE: Summation based test for calculators
(12-23-2017 07:21 PM)klesl Wrote:  TI-Nspire CX CAS - after 47s resource exhaustion, cannot complete calculations,

Thanks for the contributions. For the nspire be sure you are in approximate mode (and no pretty print when possible), otherwise the nspire tries to solve it symbolically. Like the ti89 as well.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-23-2017, 09:58 PM (This post was last modified: 12-23-2017 11:36 PM by Gilles59.)
Post: #19
RE: Summation based test for calculators
Casio FX603P
100 : 17 sec

HP15C LE
1000 : 29 sec

NewRPL HP50g hdw , 12 digits
10'000 : 56,51 sec

On the Prime
100'000 : 19,2 sec ( very fast ! )
Find all posts by this user
Quote this message in a reply
12-24-2017, 02:32 AM (This post was last modified: 12-24-2017 06:24 AM by AlexFekken.)
Post: #20
RE: Summation based test for calculators
(12-23-2017 02:27 PM)pier4r Wrote:  But for the objective of the test (not much accuracy, rather timing) I would suppose that whatever spread of the inputs would be more or less similar.
Incredible. We don't even seem to use the word "spread" with the same meaning... :-)

Wrt Simpsons rule, as someone has already pointed out in another thread: Simpson's rule is for student's only. Any serious, integration algorithm would be adaptive rather than using points with a fixed interval spacing. But perhaps it explains your obsession (in this thread) with summations.

My main personal suggestion for performance benchmarking, if you really, really feel that you have to create one, is that you do the exact opposite of what you are doing, i.e. the opposite of combining a bunch of ad hoc operations into a single benchmark and then hoping that your becnhmark becomes popular.

I would instead define and standardise a multitude of micro-benchmarks that test the simplest of operations in isolation (examples below). Then, on top of that, you can define your "Pier4r" aggregation benchmark(s), e.g. by taking some weighted average of the micro-benchmarks. That way others can define their own aggregated benchmarks, more suitable to their own use cases. Perhaps more importantly, it might help detect the relative strong and weak areas of each implementation (which can direct the implementers to the areas where they should look at improving things, or tap themselves on the back).

For example, to test the performance of loop summation I would simply write some code to calculate 1+1+1+1+1... etc, in a loop and another one to force non-integer arithmetic, e.g. sqrt(2)+sqrt(2)+sqrt(2)+sqrt(2)+ etc. I would experiment with, i.e. have different benchmarks for, getting the values out of variables versus using contstants as well. But I would certainly *avoid* calling transcendental functions (whose execution time would probably dominate the total execution time) and then suggest that I am testing the performance of a summation loop...

Wrt testing the performance of the transcendental functions, I would test them all (i.e. the ones you are interested in) in as much isolation as possible (e.g. separately time the overhead of the loops to set up the arguments; do *not* sum the values unless optimization forces you). And the basic trig functions already show that you may want multiple function-specific micro-benchmarks for every single function. For example, as some initial suggestions for the sine:

sin(x), x = -10..10 (0.001) in radians
sin(x), x = -1E6..1E6 (1) in radians
sin(x), x = -500..500 (sqrt(0.02)) in degress
sin(x), x = -1E8..1E8 (sqrt(20)) in degress
sin(x+iy), x = -10..10 (0.001), y = -10..10 (0.001) in radians
etc

EDIT: it might be a good idea to adjust the numbers above so as to have the same number of function evaluations per micro-benchmark. And to keep that number the same for the other functions.

Some of the thoughts (and correct or incorrect assumptions about implementations) behind the reason for having these different micro-benchmarks:
- Test a decent spread of unrelated (from the function's perspective) inputs
- Calculations for small and large arguments may perform very differently and not everyone may care about (very) large arguments (in this case) for their personalised aggregated benchmark
- Calculations in radians and degress may perform very differently (especially if the implementation has been careful to deal with rounding appropriately in each mode) and, again, people may only care about one of these modes
- Distinguish between real and complex calculations because the performance may be very different (perhaps predictably so for simple trig and exponential functions, but probably not for others, e.g. Gamma) and, again, not everyone will care about complex calculations.

Lots of words, encouraging you to do lots of work, by someone who isn't going to do that work. But well-intended nevertheless....
Find all posts by this user
Quote this message in a reply
Post Reply 




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