The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Numworks Calculator Comparison
09-12-2023, 04:19 AM (This post was last modified: 09-20-2023 11:37 AM by toml_12953.)
Post: #1
Numworks Calculator Comparison
Here's a comparison of the three Numworks models and one TI model. Note that the N0110 is slightly slower than the N0100 but the N0120 is clearly faster than either one of them.
All the benchmarks except Thimet come from this page:
http://www.wiki4hp.com/doku.php?id=start&do=index

Thimet comes from this page:
https://www.thimet.de/CalcCollection/Cal...mance.html

For the Addloop benchmark, I found that, once a program is interrupted, you can't print the values of its variables. Thus, I had to find a way to automatically stop the program after one minute.
I tried to do this but increase the number of calculations as little as possible. After all this benchmark is just supposed to show a single increment operation with no other ops.
If anyone has a less impactful way of doing this, I'd certainly like to know about it!

Here are the results:
https://www.dropbox.com/scl/fi/o04ytqvw3...ljmz&raw=1

Here are the programs used:

Addloop:
Code:
from time import *
def addloop():
  s=0
  t=monotonic()+60
  while monotonic()<=t:
    s +=1
  print("Count:",s)

Fourops:
Code:
from math import *
from time import *
def fourops(n=10000):
  t = monotonic()
  sum = 0
  b = 0; c = 0
  for a in range(1,n+1):
    b = a
    c = a
    sum += sqrt(b*c)/a
  print(sum)
  t = monotonic() - t 
  print("Time: {0:.3f} seconds".format(t))

Nqueens:
Code:
from time import *
def nqueens(n=100):
  t0 = monotonic()
  for i in range(n):
    a = [0] * 9
    r = 8
    s = 0
    x = 0
    y = 0
    t = 0
    while True:
      x += 1
      a[x] = r
      while True:
        s += 1
        y = x
        while y>1:
          y -= 1
          t = a[x]-a[y]
          if t==0 or x-y==abs(t):
            y=0
            a[x] -= 1
            while a[x]==0:
              x -= 1
              a[x] -= 1
        if y==1:
          break;
      if x==r:
        break;
  print(s)
  t0=(monotonic()-t0)/n
  print("Time: {0:.3f} seconds".format(t0))

Savage:
Code:
from math import *
from time import *
def savage():
  t=monotonic()
  a=1
  for i in range(1,2500):
    a=tan(atan(exp(log(sqrt(a*a)))))+1
  print(a)
  t=monotonic()-t
  print("Time: {0:.3f} seconds".format(t))

Extended Savage:
Code:
from math import *
from time import *
def savexten(n=10000):
  t = monotonic()  
  globalSum = 0
  sum = 1
  for k in range(1,n):
    sum += tan(atan(exp(log(sqrt(sum*sum)))))
  globalSum += abs((k+1)-sum)

  print(globalSum)
  t = monotonic()-t
  print("n =",n)
  print("Time: {0:.3f} seconds".format(t))

Summation:
Code:
from math import *
from time import *
def summation():
  t=monotonic()
  s=0
  for x in range(1,1001):
    s+=(exp(sin(atan(x))))**(1/3)
  print(s)
  t=monotonic()-t
  print("Time: {0:.3f} seconds".format(t))

Thimet:
Code:
from math import *
from time import *
def thimet(loops=10000):
  t=monotonic()
  for i in range(loops):
    r0=10
    while r0>0:
      x=r0
      x+=1
      x-=4.567E-4
      x+=70
      x-=69
      x*=7
      x/=11
      r0-=1
    x=log(x)
    x=sin(x)
    x=sqrt(x)
    x=sqrt(x)
  print(x)
  t=monotonic()-t
  print("Loops:",loops)
  print("Time: {:.3f} seconds".format(t))
  print("Index: {:.2f}".format(34/t*loops))

Naive Primes:
Code:
from time import *
def naiveprms(n=1000):
  t = monotonic()
  for k in range(3, n+1):
    for j in range(2, k):
      if k % j == 0:
        break
  t = monotonic()-t
  print("Time: {0:.3f} seconds".format(t))

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


Messages In This Thread
Numworks Calculator Comparison - toml_12953 - 09-12-2023 04:19 AM



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