Summation based benchmark for calculators
08-26-2018, 07:44 PM
Post: #121
 grsbanks Senior Member Posts: 1,219 Joined: Jan 2017
RE: Summation based benchmark for calculators
Planning to do just that. I should get my Prime G2 on Tuesday or Wednesday.
08-26-2018, 10:15 PM
Post: #122
 ijabbott Senior Member Posts: 1,113 Joined: Jul 2015
RE: Summation based benchmark for calculators
Casio fx-4000P
n=1000
t~388s
Result=1395.346288

I used this Dsz loop program which prompts for the number of iterations. The stopwatch was started when the number of iterations was entered at the prompt, '?':

Code:
Rad : ? → A : 0 : Lbl 1 : Ans + ∛ e sin tan⁻¹ A : Dsz A : Goto 1

— Ian Abbott
08-28-2018, 07:51 PM
Post: #123
 pier4r Senior Member Posts: 2,090 Joined: Nov 2014
RE: Summation based benchmark for calculators
Updated until post #122. If someone finds missing results, please report them!

Also some versioning is here: http://www.wiki4hp.com/doku.php?id=bench...g_exp_root

Wikis are great, Contribute :)
08-28-2018, 08:21 PM
Post: #124
 Dave Britten Senior Member Posts: 2,074 Joined: Dec 2013
RE: Summation based benchmark for calculators
Results from a Casio fx-720P with this program:

Code:
10 T=0 20 FOR X=1 TO 10:T=T+( EXP SIN ATNX)^(1/3): NEXT X 30 PRINT X

~4 sec. to produce 13.7118350167 for X=1 to 10
~43 sec. to produce 139.297187038 for X=1 to 100
08-28-2018, 08:21 PM (This post was last modified: 08-29-2018 07:45 AM by StephenG1CMZ.)
Post: #125
 StephenG1CMZ Senior Member Posts: 932 Joined: May 2015
RE: Summation based benchmark for calculators
I have written a Savage benchmark for the Prime, which provides results for both approximate and exact (CAS) mode.
But I use an Android emulator and have no hardware to time results on.
Update: Anders has reported timings for Prime C and Prime G2 here:

Stephen Lewkowicz (G1CMZ)
08-28-2018, 09:28 PM (This post was last modified: 08-28-2018 09:52 PM by ijabbott.)
Post: #126
 ijabbott Senior Member Posts: 1,113 Joined: Jul 2015
RE: Summation based benchmark for calculators
HP-27S
n=1000
t∼120s
Result=1395.3462877

Code:
BENCH=Σ(X:1:1000:1:EXP(SIN(ATAN(X)))^.333333333333)

Surprisingly fast compared to HP-42S.

(I originally used 'INV(3)' instead of '.333333333333', but it was slower due to the extra function overhead. The calculator has no cube root or nth root function.)

— Ian Abbott
08-29-2018, 04:19 AM (This post was last modified: 08-29-2018 04:22 AM by Tim Wessman.)
Post: #127
 Tim Wessman Senior Member Posts: 2,280 Joined: Dec 2013
RE: Summation based benchmark for calculators
PrimeG2: ~7.22_s with run of 10 average.

SUM function, 100000

TW

Although I work for HP, the views and opinions I post here are my own.
08-29-2018, 06:17 AM (This post was last modified: 08-29-2018 06:18 AM by pier4r.)
Post: #128
 pier4r Senior Member Posts: 2,090 Joined: Nov 2014
RE: Summation based benchmark for calculators
Wow, before it was 19 seconds . Is the g2 version optimized or is it clocked at 800+ MHz?

The thingy starts to be golden in term of power expressiveness of HP ppl.

It is faster than an iPhone and that's not trivial to achieve.

I still have to put the results on the first page though.

Wikis are great, Contribute :)
08-31-2018, 07:53 PM
Post: #129
 pier4r Senior Member Posts: 2,090 Joined: Nov 2014
RE: Summation based benchmark for calculators
Updated up to post #127

Wikis are great, Contribute :)
09-05-2018, 05:36 AM (This post was last modified: 09-05-2018 11:52 AM by Gene.)
Post: #130
 lrvan Junior Member Posts: 2 Joined: Sep 2018
RE: Summation based benchmark for calculators
Casio fx-92+ Spéciale Collège
n=1000
t~163 s.
result=1395,346288

0->A
0->B
Répétez jusqu'a A=1000
A+1->A
B+3V(e^(sin(Arcttan(A))))->B
<-
Afficher résult B

Gene: Translation below from Google.

Casio fx-92 + Special College
n = 1000
t ~ 163 s.
result = 1395.346288

0-> A
0-> B
Repeat until A = 1000
A + 1> A
B + 3V (e ^ (sin (Arcttan (A)))) -> B
<-
Show result B
09-05-2018, 10:34 AM
Post: #131
 brickviking Senior Member Posts: 336 Joined: Dec 2014
RE: Summation based benchmark for calculators
Regarding the original summation test, I decided to feed it through my copy of x48-0.6.4. I got some slightly strange results, which seem to be dependent upon the machine that x48's running on, so I'm interested in knowing if anyone's done the test on a real 48SX, as I haven't seen one in pier4r's list of results. My program's below, but it's pretty much the sum from 1 to n for the original formula.

Quote:%And yes, you'll have to type in that sum symbol yourself (Right-Shift-U for the 48SX/GX)
\<< \-> CNT
\<< TICKS '$$\sum$$(X=1,CNT,XROOT(3,EXP(SIN(ATAN(X)))))' EVAL SWAP TICKS SWAP -
8192 /
\>>
\>>

Oh, and I finally managed to find a PDF manual for the SX; as most of you know, there are quite a few differences between the SX and GX and they were doing my head in. I still don't know how to do certain things I take for granted on my 50G, but things are considerably more spartan on the SX.

(Post 274)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
09-05-2018, 10:36 AM
Post: #132
 pier4r Senior Member Posts: 2,090 Joined: Nov 2014
RE: Summation based benchmark for calculators
also anyone else with the prime G2 ?

Wikis are great, Contribute :)
09-05-2018, 10:41 AM (This post was last modified: 09-05-2018 10:54 AM by grsbanks.)
Post: #133
 grsbanks Senior Member Posts: 1,219 Joined: Jan 2017
RE: Summation based benchmark for calculators
(09-05-2018 10:36 AM)pier4r Wrote:  also anyone else with the prime G2 ?

I have one. Just need 5 minutes to run the tests and report back!

Edit: Here's a screenshot of a bunch of tests...

09-05-2018, 12:23 PM
Post: #134
 lrvan Junior Member Posts: 2 Joined: Sep 2018
RE: Summation based benchmark for calculators
Casio fx-92+ Spéciale Collège
n=1000
t~163s
Result=1395.346288

With "Algorithmique" feature[/php]
09-05-2018, 02:26 PM
Post: #135
 rprosperi Super Moderator Posts: 5,250 Joined: Dec 2013
RE: Summation based benchmark for calculators
(09-05-2018 10:34 AM)brickviking Wrote:  Regarding the original summation test, I decided to feed it through my copy of x48-0.6.4. I got some slightly strange results, which seem to be dependent upon the machine that x48's running on, so I'm interested in knowing if anyone's done the test on a real 48SX, as I haven't seen one in pier4r's list of results. My program's below, but it's pretty much the sum from 1 to n for the original formula.

Quote:%And yes, you'll have to type in that sum symbol yourself (Right-Shift-U for the 48SX/GX)
\<< \-> CNT
\<< TICKS '$$\sum$$(X=1,CNT,XROOT(3,EXP(SIN(ATAN(X)))))' EVAL SWAP TICKS SWAP -
8192 /
\>>
\>>

Oh, and I finally managed to find a PDF manual for the SX; as most of you know, there are quite a few differences between the SX and GX and they were doing my head in. I still don't know how to do certain things I take for granted on my 50G, but things are considerably more spartan on the SX.

(Post 274)

Using a slightly modified program (since I have TEVAL already built) my results for a real 48SX are:

n=1000
t=95.5s
Result=1395.3462877

--Bob Prosperi
09-06-2018, 09:30 PM
Post: #136
 Guenter Schink Senior Member Posts: 463 Joined: Dec 2013
RE: Summation based benchmark for calculators
a different result for NUMWORKS (Python script)

Someone posted that 100000 iterations would take 84sec. My script does it within 68sec. Perhaps I made a mistake? I'm not at all experienced with Python.

So here is the short script
Code:
 from math import * x=0 for i in range(1,100001):  x=x+pow(exp(sin(atan(i))),1/3) print(x)

Result is 139560.97614110521

Günter
09-06-2018, 09:46 PM
Post: #137
 Dave Britten Senior Member Posts: 2,074 Joined: Dec 2013
RE: Summation based benchmark for calculators
(09-06-2018 09:30 PM)Guenter Schink Wrote:  a different result for NUMWORKS (Python script)

Someone posted that 100000 iterations would take 84sec. My script does it within 68sec. Perhaps I made a mistake? I'm not at all experienced with Python.

So here is the short script
Code:
 from math import * x=0 for i in range(1,100001):  x=x+pow(exp(sin(atan(i))),1/3) print(x)

Result is 139560.97614110521

Günter

As was pointed out to me over in this thread, you can significantly speed up Micro Python code by doing the work inside a function.

This version runs in about 57 seconds on my Casio fx-CG50, producing 139560.9761410521:

Code:
from math import * def RunTest():   x=0   for i in range(1,100001):     x=x+pow(exp(sin(atan(i))),1/3)   print(x) RunTest()
09-06-2018, 10:12 PM (This post was last modified: 09-06-2018 10:13 PM by Guenter Schink.)
Post: #138
 Guenter Schink Senior Member Posts: 463 Joined: Dec 2013
RE: Summation based benchmark for calculators
(09-06-2018 09:46 PM)Dave Britten Wrote:
(09-06-2018 09:30 PM)Guenter Schink Wrote:  a different result for NUMWORKS (Python script)

Someone posted that 100000 iterations would take 84sec. My script does it within 68sec. Perhaps I made a mistake? I'm not at all experienced with Python.

So here is the short script
Code:
 from math import * x=0 for i in range(1,100001):  x=x+pow(exp(sin(atan(i))),1/3) print(x)

Result is 139560.97614110521

Günter

As was pointed out to me over in this thread, you can significantly speed up Micro Python code by doing the work inside a function.

This version runs in about 57 seconds on my Casio fx-CG50, producing 139560.9761410521:

Code:
from math import * def RunTest():   x=0   for i in range(1,100001):     x=x+pow(exp(sin(atan(i))),1/3)   print(x) RunTest()

Thanks Dave,

I applied the changes as above, making it a function. The difference however is marginal, 65sec instead of 68. Seems to depend on the implementation of Python. But it's an improvement still.

Regards, Günter

edit: typo
09-06-2018, 10:23 PM
Post: #139
 Albert Chan Senior Member Posts: 1,841 Joined: Jul 2018
RE: Summation based benchmark for calculators
(09-06-2018 09:46 PM)Dave Britten Wrote:
Code:
from math import * def RunTest():   x=0   for i in range(1,100001):     x=x+pow(exp(sin(atan(i))),1/3)   print(x) RunTest()

Hi, Dave Britten

Does Micro Python support default arguments, like regular Python ?

If Yes, changing def RunTest() to def RunTest(pow=pow, exp=exp, sin=sin, atan=atan) should be faster.
Now, all variables are locals (pow, exp, sin, atan are variables too)
09-06-2018, 11:28 PM (This post was last modified: 09-06-2018 11:37 PM by ijabbott.)
Post: #140
 ijabbott Senior Member Posts: 1,113 Joined: Jul 2015
RE: Summation based benchmark for calculators
(09-06-2018 10:23 PM)Albert Chan Wrote:  Does Micro Python support default arguments, like regular Python ?

If Yes, changing def RunTest() to def RunTest(pow=pow, exp=exp, sin=sin, atan=atan) should be faster.
Now, all variables are locals (pow, exp, sin, atan are variables too)

You could assign those as variables within RunTest() itself.

Code:
import math def RunTest(n):   pow=math.pow   exp=math.exp   sin=math.sin   atan=math.atan   x=0   for i in range(1,n+1):     x=x+pow(exp(sin(atan(i))),1/3)   print(x) RunTest(100000)

Finishes in ~53 seconds on fx-CG50.

— Ian Abbott
 « Next Oldest | Next Newest »

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