mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 00:46:07 +00:00
update how powers work
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import "csv" as csv
|
||||
|
||||
term.log(csv.read("tests/test.csv"))
|
||||
let table = (csv.read("tests/test.csv"))
|
||||
|
||||
term.log(number(table[::-1][0][::-1][0]))
|
||||
19
tests/diff.ar
Normal file
19
tests/diff.ar
Normal file
@@ -0,0 +1,19 @@
|
||||
let zero = 1/infinity
|
||||
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
|
||||
|
||||
forever do
|
||||
n = f(x)
|
||||
term.log("f"+("'"*d)+"("+x+") = "+n)
|
||||
if (n == 0) break
|
||||
f = diff(f)
|
||||
d = d + 1
|
||||
count = 0
|
||||
@@ -1,6 +1,6 @@
|
||||
f() = do
|
||||
a = []
|
||||
for (i from 0 to 10000) a.append(i)
|
||||
for (i from 0 to 100000) a.append(i)
|
||||
|
||||
term.log("start")
|
||||
f()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
x = 10
|
||||
let x = 10
|
||||
|
||||
do
|
||||
let x = 20
|
||||
|
||||
Reference in New Issue
Block a user