forked from xxq250/Nasal-Interpreter
change id name & add test file
This commit is contained in:
@@ -137,7 +137,7 @@ while(error>0.001)
|
||||
}
|
||||
cnt+=1;
|
||||
show+=1;
|
||||
if(show==150)
|
||||
if(show==200)
|
||||
{
|
||||
show=0;
|
||||
print('epoch ',cnt,':',error,'\r');
|
||||
|
||||
10
test/pi.nas
Normal file
10
test/pi.nas
Normal file
@@ -0,0 +1,10 @@
|
||||
import("lib.nas");
|
||||
|
||||
var t=1;
|
||||
var res=0;
|
||||
for(var m=1;m<1e6;m+=2)
|
||||
{
|
||||
res+=t*1/m;
|
||||
t*=-1;
|
||||
}
|
||||
println(res*4);
|
||||
Reference in New Issue
Block a user