瀏覽代碼

- extended numerics test num_02 to utilize the power-of sign "^" in various ways + modulo operator "mod"

Ronny Otto 11 年之前
父節點
當前提交
e72fa6da91
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 7 1
      tests/framework/numerics/num_02.bmx
  2. 4 0
      tests/framework/numerics/num_02.res

+ 7 - 1
tests/framework/numerics/num_02.bmx

@@ -12,4 +12,10 @@ Print f1 / f2
 Print (f1 / f2)
 Print f1 / (f2)
 
-
+'funny... 2^2 gets converted to a long?!!
+Print 2^2
+'sqrt
+Print 4^(0.5)
+'same like writing 1 / (2^2)
+Print 2^-2
+Print 10 mod 2 

+ 4 - 0
tests/framework/numerics/num_02.res

@@ -4,3 +4,7 @@
 0.0581395365
 0.0581395365
 0.0581395365
+4.0000000000000000
+2.0000000000000000
+0.25000000000000000
+0