gambas-source-code/benchmark/polynom.py

24 lines
345 B
Python
Raw Normal View History

#!/usr/bin/python
n = 500000
x = 0.2
def t(x):
mu = 10.0
pu = 0.0
pol = [0] * 100
r = range(0,100)
for i in range(0,n):
for j in r:
pol[j] = mu = (mu + 2.0) / 2.0
su = 0.0
for j in r:
su = x * su + pol[j]
pu = pu + su
return pu
for i in range(2):
print t(x)