Post Reply 
Summation based benchmark for calculators
04-10-2023, 10:21 PM
Post: #240
RE: Summation based benchmark for calculators
(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
$

Mike T.

HP21, HP25, HP32E, HP33C, HP34C, HP10C, HP11C, HP12C, HP32S, HP22S
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Summation based benchmark for calculators - Mike T. - 04-10-2023 10:21 PM



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