]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: use more precision when printing numbers
[ocean] / csrc / oceani-tests.mdc
index d65b6f97d8593548f13648e3216f09f80a34a44b..359c8e504675d0dc36ceed1f4a0f880da8130d26 100644 (file)
@@ -136,7 +136,7 @@ calculations on them.
 
 ###### output: valvar
 
-       23 12 35 11 276 1.91667 11
+       23 12 35 11 276 1.916666667 11
        False False True True False False True
        23 12 12 -23 -12 12
        False True True False False False
@@ -158,7 +158,7 @@ Next we change the value of variables
                print a, a/a
 
 ###### output: setvar
-       1.07374e+09 1
+       1073741824 1
 
 Now some contants
 
@@ -181,7 +181,7 @@ Now some contants
 ###### output: consts
        Hello World, what lovely oceans you have!
        are there 5 ?
-       3.14159 I like Pie but The cake is a lie
+       3.141592653 I like Pie but The cake is a lie
 
 Test merging of variables from multiple cases
 
@@ -280,13 +280,13 @@ Now we need to test if/else and some different loops
        Success
         1 2 4 8 16 32 64
        0 1.5
-       1 1.41667
-       2 1.41422
-       3 1.41421
-       error is  -4.51095e-12
+       1 1.416666667
+       2 1.414215686
+       3 1.414213562
+       error is  -4.510950445e-12
        I won't calculate 20 / 0
-       20 / 3  = 6.66667
-       20 / 6  = 3.33333
+       20 / 3  = 6.666666667
+       20 / 6  = 3.333333333
        I won't calculate 20 / 9
        Close enough
        higher
@@ -392,7 +392,7 @@ Here I break it into two parts, keeping the array code separate.
        GCD of 55 and 33 is 11
        Fibonacci: 1 1 2 3 5 8 13 21 34 55 89 144
        hello was the str
-       Closest I found was 77.3438
+       Closest I found was 77.34375
 
 ###### output: sayhello,12,60,there,False
        Hello World, what lovely oceans you have!
@@ -402,7 +402,7 @@ Here I break it into two parts, keeping the array code separate.
        GCD of 12 and 60 is 12
        Fibonacci: 1 1 2 3 5 8 13 21 34 55 89 144
        I found the str over there
-       Closest I found was 77.3438
+       Closest I found was 77.34375
 
 ###### test list
        oceani_tests += "insert_sort"