Skip to content

Commit

Permalink
sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
aslanix committed Feb 19, 2024
1 parent 414cc82 commit db4e665
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/rt/pos/core/sqrt01.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
2024-02-19T10:01:21.535Z [RTM] info: Skipping network creation. Observe that all external IO operations will yield a runtime error.
65536
256
16
4
2
1.4142135623730951
1.189207115002721
1.0905077326652577
1.0442737824274138
1.0218971486541166
1.0108892860517005
1.0054299011128027
1.0027112750502025
1.0013547198921082
1.0006771306930664
1.0003385080526823
100000000
10000
100
10
3.1622776601683795
1.7782794100389228
1.333521432163324
1.1547819846894583
1.0746078283213176
1.036632928437698
>>> Main thread finished with value: ()@{}%{}
10 changes: 10 additions & 0 deletions tests/rt/pos/core/sqrt01.trp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let fun f x n =
if n > 0 then
let val y = sqrt x in
print y;
f y (n -1)
end
else ()
in f (65536*65536) 16;
f (10000000000000000) 10
end

0 comments on commit db4e665

Please sign in to comment.