Post Reply 
Summation based benchmark for calculators
11-18-2018, 03:25 PM
Post: #146
RE: Summation based benchmark for calculators
(11-17-2018 11:37 PM)pier4r Wrote:  (I wonder if the savage test can be optimized as well as it trivially use a function and its inverse)

The formula for the Savage test can definitely be simplified by the 50g CAS:
Code:
'TAN(ATAN(EXP(LN(√SQ(X)))))+1'
SIMPLIFY

...yields:
Code:
'|X|+1'

You could probably come up with an implementation that starts with the long version of the above, then SIMPLIFY it and loop the modified algebraic to come up with a total. It would be fast, and of course accurate as well. But it wouldn't be running the actual Savage test, would it? I see this as the same issue, and the result would be similarly meaningless in the context of that benchmark.

After a bit of playing around with this, it appears that the UserRPL SIMPLIFY command will skip this particular optimization if you set system flag -111. However, the Σ command's simplification doesn't use the same code as SIMPLIFY. It appears to be hard-wired to simplify regardless of that flag's setting (it uses an internal SysRPL routine called SimplifyExpression instead).

Just to be clear, I actually think it's a Good Thing that Σ performs this simplification, in that the typical use case for that command will normally only benefit or remain neutral from that step. Benchmarking and performance comparisons are the only situations I can think of where this feature may actually be problematic, since you can end up running entirely different code than you originally intended.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summation based benchmark for calculators - DavidM - 11-18-2018 03:25 PM



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