Post Reply 
Summation based benchmark for calculators
04-11-2023, 03:25 AM (This post was last modified: 04-11-2023 03:34 AM by toml_12953.)
Post: #241
RE: Summation based benchmark for calculators
(04-10-2023 10:21 PM)Mike T. Wrote:  
(01-28-2023 09:22 AM)BINUBALL Wrote:  Tested with HP-200LX too.

Couldn't resist trying this on a modern PC...

Code:

#include <math.h>
#include <stdio.h>

void main()
{
  double i,sum;
  i=1;
  sum=0;
  for(i=1;i<=10000;i++)
  {
  sum+=pow(exp(sin(atan(i))),1/3.);
  }
  printf("%lf\n",sum);
}

$ gcc sum.c -o sum -lm
$ time ./sum 
13955.857904

real    0m0.005s
user    0m0.005s
sys    0m0.001s
$

In Windows 11 on a Core i9 I get this:

PS D:\Users\tlake\Desktop> Measure-Command {start-process ./sum}

Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 12
Ticks : 120251
TotalDays : 1.39179398148148E-07
TotalHours : 3.34030555555556E-06
TotalMinutes : 0.000200418333333333
TotalSeconds : 0.0120251
TotalMilliseconds : 12.0251

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summation based benchmark for calculators - toml_12953 - 04-11-2023 03:25 AM



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