]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Random1.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Random1.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Random1.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Random1.scl
deleted file mode 100644 (file)
index 66922ea..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-import "StandardLibrary"\r
-\r
-// Actual program\r
-\r
-"""This function returns either 0 or 1 such that\r
-the expected value is pi/4"""\r
-approximatePi :: () -> <Random> Double\r
-approximatePi () = if x*x + y*y < 1 then 1 else 0\r
-  where\r
-    x = randomDouble\r
-    y = randomDouble\r
-\r
-averageOfNRepeats n f = sum [f () | n <- [1..n]] / fromInteger n\r
-\r
-betterApproximatePi () = averageOfNRepeats 1000 approximatePi * 4\r
-\r
-main = withSeed 13 (betterApproximatePi ())\r
---\r
-3.068
\ No newline at end of file