mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 00:46:07 +00:00
fix operation translation taking ages
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
let zero = 1/infinity
|
||||
let zero = 1e-1000
|
||||
let diff(f) = (x) = (f(x + zero) - f(x)) / zero
|
||||
|
||||
let count = 0
|
||||
|
||||
let f(x) = do
|
||||
count = count + 1
|
||||
term.log(count)
|
||||
return x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1
|
||||
x = 100
|
||||
d = 0
|
||||
let x = 100
|
||||
let d = 0
|
||||
|
||||
forever do
|
||||
n = f(x)
|
||||
let n = f(x)
|
||||
term.log("f"+("'"*d)+"("+x+") = "+n)
|
||||
if (n == 0) break
|
||||
f = diff(f)
|
||||
d = d + 1
|
||||
count = 0
|
||||
d = d + 1
|
||||
Reference in New Issue
Block a user