summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/tests')
-rw-r--r--ext/bcmath/tests/bcmod.phpt4
-rw-r--r--ext/bcmath/tests/bcmul.phpt2
-rw-r--r--ext/bcmath/tests/bcpow.phpt2
-rw-r--r--ext/bcmath/tests/bcsqrt.phpt2
-rw-r--r--ext/bcmath/tests/bcsub.phpt2
5 files changed, 12 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcmod.phpt b/ext/bcmath/tests/bcmod.phpt
index 1d7be48a75..5657e02ddc 100644
--- a/ext/bcmath/tests/bcmod.phpt
+++ b/ext/bcmath/tests/bcmod.phpt
@@ -9,8 +9,12 @@ bcmath.scale=0
echo bcmod("11", "2"),"\n";
echo bcmod("-1", "5"),"\n";
echo bcmod("8728932001983192837219398127471", "1928372132132819737213"),"\n";
+echo bcmod("3.5", "4"),"\n";
+echo bcmod("1071", "357.5"),"\n";
?>
--EXPECT--
1
-1
1459434331351930289678
+3.5
+356.0
diff --git a/ext/bcmath/tests/bcmul.phpt b/ext/bcmath/tests/bcmul.phpt
index 0ff322fe32..20893552da 100644
--- a/ext/bcmath/tests/bcmul.phpt
+++ b/ext/bcmath/tests/bcmul.phpt
@@ -10,9 +10,11 @@ echo bcmul("1", "2"),"\n";
echo bcmul("-3", "5"),"\n";
echo bcmul("1234567890", "9876543210"),"\n";
echo bcmul("2.5", "1.5", 2),"\n";
+echo bcmul("2.555", "1.555", 2),"\n";
?>
--EXPECT--
2
-15
12193263111263526900
3.75
+3.97
diff --git a/ext/bcmath/tests/bcpow.phpt b/ext/bcmath/tests/bcpow.phpt
index bdd4e08cab..141ec61d92 100644
--- a/ext/bcmath/tests/bcpow.phpt
+++ b/ext/bcmath/tests/bcpow.phpt
@@ -9,8 +9,10 @@ bcmath.scale=0
echo bcpow("1", "2"),"\n";
echo bcpow("-2", "5", 4),"\n";
echo bcpow("2", "64"),"\n";
+echo bcpow("-2.555", "5", 2),"\n";
?>
--EXPECT--
1
-32
18446744073709551616
+-108.88
diff --git a/ext/bcmath/tests/bcsqrt.phpt b/ext/bcmath/tests/bcsqrt.phpt
index 46d92fd5ed..9f4a8ec6a5 100644
--- a/ext/bcmath/tests/bcsqrt.phpt
+++ b/ext/bcmath/tests/bcsqrt.phpt
@@ -7,8 +7,10 @@ bcmath.scale=0
--FILE--
<?php
echo bcsqrt("9"),"\n";
+echo bcsqrt("9.444", 2),"\n";
echo bcsqrt("1928372132132819737213", 5),"\n";
?>
--EXPECT--
3
+3.07
43913234134.28826
diff --git a/ext/bcmath/tests/bcsub.phpt b/ext/bcmath/tests/bcsub.phpt
index 71726492f7..8d85d23233 100644
--- a/ext/bcmath/tests/bcsub.phpt
+++ b/ext/bcmath/tests/bcsub.phpt
@@ -8,9 +8,11 @@ bcmath.scale=0
<?php
echo bcsub("1", "2"),"\n";
echo bcsub("-1", "5", 4),"\n";
+echo bcsub("1.555", "2.555", 2),"\n";
echo bcsub("8728932001983192837219398127471", "1928372132132819737213", 2),"\n";
?>
--EXPECT--
-1
-6.0000
+-1.00
8728932000054820705086578390258.00