summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy wharmby <wharmby@php.net>2009-06-11 21:17:10 +0000
committerandy wharmby <wharmby@php.net>2009-06-11 21:17:10 +0000
commit3f1bdda498e5a85e151fc51351f4dc7c0a36a302 (patch)
treeadfbdc03eb45aea4234be28ddf9b435614a09e40
parentaa152b1c509a7da8dda42eec1cd9806bcb11d4a1 (diff)
downloadphp-git-3f1bdda498e5a85e151fc51351f4dc7c0a36a302.tar.gz
New 64 bit math tests. Tested on Windows, Linux and Linux 64 bit. Tests authored by Dave Kelsey
-rw-r--r--ext/standard/tests/math/abs_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/acos_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/acosh_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/asin_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/asinh_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/atan2_basiclong_64bit.phpt364
-rw-r--r--ext/standard/tests/math/atan_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/atanh_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/bindec_basiclong_64bit.phpt51
-rw-r--r--ext/standard/tests/math/ceil_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/cos_basiclong_64bit.phpt62
-rw-r--r--ext/standard/tests/math/cosh_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/decbin_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/dechex_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/decoct_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/deg2rad_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/exp_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/expm1_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/floor_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/fmod_basiclong_64bit.phpt364
-rw-r--r--ext/standard/tests/math/hexdec_basiclong_64bit.phpt51
-rw-r--r--ext/standard/tests/math/hypot_basiclong_64bit.phpt364
-rw-r--r--ext/standard/tests/math/is_finite_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/is_infinite_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/is_nan_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/log10_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/log1p_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/log_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/octdec_basiclong_64bit.phpt51
-rw-r--r--ext/standard/tests/math/pow_basiclong_64bit.phpt364
-rw-r--r--ext/standard/tests/math/rad2deg_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/round_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/sin_basiclong_64bit.phpt62
-rw-r--r--ext/standard/tests/math/sinh_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/sqrt_basiclong_64bit.phpt60
-rw-r--r--ext/standard/tests/math/tan_basiclong_64bit.phpt62
-rw-r--r--ext/standard/tests/math/tanh_basiclong_64bit.phpt60
37 files changed, 3415 insertions, 0 deletions
diff --git a/ext/standard/tests/math/abs_basiclong_64bit.phpt b/ext/standard/tests/math/abs_basiclong_64bit.phpt
new file mode 100644
index 0000000000..ccb2556427
--- /dev/null
+++ b/ext/standard/tests/math/abs_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test abs function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(abs($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+int(9223372036854775807)
+--- testing: -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 2147483647 ---
+int(2147483647)
+--- testing: -2147483648 ---
+int(2147483648)
+--- testing: 9223372034707292160 ---
+int(9223372034707292160)
+--- testing: -9223372034707292160 ---
+int(9223372034707292160)
+--- testing: 2147483648 ---
+int(2147483648)
+--- testing: -2147483649 ---
+int(2147483649)
+--- testing: 4294967294 ---
+int(4294967294)
+--- testing: 4294967295 ---
+int(4294967295)
+--- testing: 4294967293 ---
+int(4294967293)
+--- testing: 9223372036854775806 ---
+int(9223372036854775806)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+int(9223372036854775807)
+--- testing: -9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+===DONE===
diff --git a/ext/standard/tests/math/acos_basiclong_64bit.phpt b/ext/standard/tests/math/acos_basiclong_64bit.phpt
new file mode 100644
index 0000000000..3d811f5928
--- /dev/null
+++ b/ext/standard/tests/math/acos_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test acos function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(acos($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(NAN)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(NAN)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(NAN)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(NAN)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(NAN)
+--- testing: 4294967295 ---
+float(NAN)
+--- testing: 4294967293 ---
+float(NAN)
+--- testing: 9223372036854775806 ---
+float(NAN)
+--- testing: 9.2233720368548E+18 ---
+float(NAN)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/acosh_basiclong_64bit.phpt b/ext/standard/tests/math/acosh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..80c33b224b
--- /dev/null
+++ b/ext/standard/tests/math/acosh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test acosh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(acosh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(44.361419555836)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(22.180709777453)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(44.361419555604)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(22.180709777918)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(22.873856958013)
+--- testing: 4294967295 ---
+float(22.873856958245)
+--- testing: 4294967293 ---
+float(22.87385695778)
+--- testing: 9223372036854775806 ---
+float(44.361419555836)
+--- testing: 9.2233720368548E+18 ---
+float(44.361419555836)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/asin_basiclong_64bit.phpt b/ext/standard/tests/math/asin_basiclong_64bit.phpt
new file mode 100644
index 0000000000..7e17f2daff
--- /dev/null
+++ b/ext/standard/tests/math/asin_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test asin function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(asin($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(NAN)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(NAN)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(NAN)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(NAN)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(NAN)
+--- testing: 4294967295 ---
+float(NAN)
+--- testing: 4294967293 ---
+float(NAN)
+--- testing: 9223372036854775806 ---
+float(NAN)
+--- testing: 9.2233720368548E+18 ---
+float(NAN)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/asinh_basiclong_64bit.phpt b/ext/standard/tests/math/asinh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..a501d75d3c
--- /dev/null
+++ b/ext/standard/tests/math/asinh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test asinh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(asinh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(44.361419555836)
+--- testing: -9223372036854775808 ---
+float(-44.361419555836)
+--- testing: 2147483647 ---
+float(22.180709777453)
+--- testing: -2147483648 ---
+float(-22.180709777918)
+--- testing: 9223372034707292160 ---
+float(44.361419555604)
+--- testing: -9223372034707292160 ---
+float(-44.361419555604)
+--- testing: 2147483648 ---
+float(22.180709777918)
+--- testing: -2147483649 ---
+float(-22.180709778384)
+--- testing: 4294967294 ---
+float(22.873856958013)
+--- testing: 4294967295 ---
+float(22.873856958245)
+--- testing: 4294967293 ---
+float(22.87385695778)
+--- testing: 9223372036854775806 ---
+float(44.361419555836)
+--- testing: 9.2233720368548E+18 ---
+float(44.361419555836)
+--- testing: -9223372036854775807 ---
+float(-44.361419555836)
+--- testing: -9.2233720368548E+18 ---
+float(-44.361419555836)
+===DONE===
diff --git a/ext/standard/tests/math/atan2_basiclong_64bit.phpt b/ext/standard/tests/math/atan2_basiclong_64bit.phpt
new file mode 100644
index 0000000000..e0548a08ee
--- /dev/null
+++ b/ext/standard/tests/math/atan2_basiclong_64bit.phpt
@@ -0,0 +1,364 @@
+--TEST--
+Test atan2 function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MIN_32Bit, MAX_64Bit, MIN_64Bit);
+
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal, $otherVal ---\n";
+ var_dump(atan2($longVal, $otherVal));
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807, 0 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, 1 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, -1 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, 7 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, 9 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, 65 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, -44 ---
+float(1.5707963267949)
+--- testing: 9223372036854775807, 2147483647 ---
+float(1.5707963265621)
+--- testing: 9223372036854775807, -2147483648 ---
+float(1.5707963270277)
+--- testing: 9223372036854775807, 9223372036854775807 ---
+float(0.78539816339745)
+--- testing: 9223372036854775807, -9223372036854775808 ---
+float(2.3561944901923)
+--- testing: -9223372036854775808, 0 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, 1 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, -1 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, 7 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, 9 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, 65 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, -44 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775808, 2147483647 ---
+float(-1.5707963265621)
+--- testing: -9223372036854775808, -2147483648 ---
+float(-1.5707963270277)
+--- testing: -9223372036854775808, 9223372036854775807 ---
+float(-0.78539816339745)
+--- testing: -9223372036854775808, -9223372036854775808 ---
+float(-2.3561944901923)
+--- testing: 2147483647, 0 ---
+float(1.5707963267949)
+--- testing: 2147483647, 1 ---
+float(1.5707963263292)
+--- testing: 2147483647, -1 ---
+float(1.5707963272606)
+--- testing: 2147483647, 7 ---
+float(1.5707963235353)
+--- testing: 2147483647, 9 ---
+float(1.5707963226039)
+--- testing: 2147483647, 65 ---
+float(1.5707962965269)
+--- testing: 2147483647, -44 ---
+float(1.570796347284)
+--- testing: 2147483647, 2147483647 ---
+float(0.78539816339745)
+--- testing: 2147483647, -2147483648 ---
+float(2.3561944904252)
+--- testing: 2147483647, 9223372036854775807 ---
+float(2.3283064354545E-10)
+--- testing: 2147483647, -9223372036854775808 ---
+float(3.141592653357)
+--- testing: -2147483648, 0 ---
+float(-1.5707963267949)
+--- testing: -2147483648, 1 ---
+float(-1.5707963263292)
+--- testing: -2147483648, -1 ---
+float(-1.5707963272606)
+--- testing: -2147483648, 7 ---
+float(-1.5707963235353)
+--- testing: -2147483648, 9 ---
+float(-1.5707963226039)
+--- testing: -2147483648, 65 ---
+float(-1.5707962965269)
+--- testing: -2147483648, -44 ---
+float(-1.570796347284)
+--- testing: -2147483648, 2147483647 ---
+float(-0.78539816363028)
+--- testing: -2147483648, -2147483648 ---
+float(-2.3561944901923)
+--- testing: -2147483648, 9223372036854775807 ---
+float(-2.3283064365387E-10)
+--- testing: -2147483648, -9223372036854775808 ---
+float(-3.141592653357)
+--- testing: 9223372034707292160, 0 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, 1 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, -1 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, 7 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, 9 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, 65 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, -44 ---
+float(1.5707963267949)
+--- testing: 9223372034707292160, 2147483647 ---
+float(1.5707963265621)
+--- testing: 9223372034707292160, -2147483648 ---
+float(1.5707963270277)
+--- testing: 9223372034707292160, 9223372036854775807 ---
+float(0.78539816328103)
+--- testing: 9223372034707292160, -9223372036854775808 ---
+float(2.3561944903088)
+--- testing: -9223372034707292160, 0 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, 1 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, -1 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, 7 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, 9 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, 65 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, -44 ---
+float(-1.5707963267949)
+--- testing: -9223372034707292160, 2147483647 ---
+float(-1.5707963265621)
+--- testing: -9223372034707292160, -2147483648 ---
+float(-1.5707963270277)
+--- testing: -9223372034707292160, 9223372036854775807 ---
+float(-0.78539816328103)
+--- testing: -9223372034707292160, -9223372036854775808 ---
+float(-2.3561944903088)
+--- testing: 2147483648, 0 ---
+float(1.5707963267949)
+--- testing: 2147483648, 1 ---
+float(1.5707963263292)
+--- testing: 2147483648, -1 ---
+float(1.5707963272606)
+--- testing: 2147483648, 7 ---
+float(1.5707963235353)
+--- testing: 2147483648, 9 ---
+float(1.5707963226039)
+--- testing: 2147483648, 65 ---
+float(1.5707962965269)
+--- testing: 2147483648, -44 ---
+float(1.570796347284)
+--- testing: 2147483648, 2147483647 ---
+float(0.78539816363028)
+--- testing: 2147483648, -2147483648 ---
+float(2.3561944901923)
+--- testing: 2147483648, 9223372036854775807 ---
+float(2.3283064365387E-10)
+--- testing: 2147483648, -9223372036854775808 ---
+float(3.141592653357)
+--- testing: -2147483649, 0 ---
+float(-1.5707963267949)
+--- testing: -2147483649, 1 ---
+float(-1.5707963263292)
+--- testing: -2147483649, -1 ---
+float(-1.5707963272606)
+--- testing: -2147483649, 7 ---
+float(-1.5707963235353)
+--- testing: -2147483649, 9 ---
+float(-1.5707963226039)
+--- testing: -2147483649, 65 ---
+float(-1.5707962965269)
+--- testing: -2147483649, -44 ---
+float(-1.570796347284)
+--- testing: -2147483649, 2147483647 ---
+float(-0.78539816386311)
+--- testing: -2147483649, -2147483648 ---
+float(-2.3561944899595)
+--- testing: -2147483649, 9223372036854775807 ---
+float(-2.3283064376229E-10)
+--- testing: -2147483649, -9223372036854775808 ---
+float(-3.141592653357)
+--- testing: 4294967294, 0 ---
+float(1.5707963267949)
+--- testing: 4294967294, 1 ---
+float(1.5707963265621)
+--- testing: 4294967294, -1 ---
+float(1.5707963270277)
+--- testing: 4294967294, 7 ---
+float(1.5707963251651)
+--- testing: 4294967294, 9 ---
+float(1.5707963246994)
+--- testing: 4294967294, 65 ---
+float(1.5707963116609)
+--- testing: 4294967294, -44 ---
+float(1.5707963370394)
+--- testing: 4294967294, 2147483647 ---
+float(1.1071487177941)
+--- testing: 4294967294, -2147483648 ---
+float(2.034443935982)
+--- testing: 4294967294, 9223372036854775807 ---
+float(4.656612870909E-10)
+--- testing: 4294967294, -9223372036854775808 ---
+float(3.1415926531241)
+--- testing: 4294967295, 0 ---
+float(1.5707963267949)
+--- testing: 4294967295, 1 ---
+float(1.5707963265621)
+--- testing: 4294967295, -1 ---
+float(1.5707963270277)
+--- testing: 4294967295, 7 ---
+float(1.5707963251651)
+--- testing: 4294967295, 9 ---
+float(1.5707963246994)
+--- testing: 4294967295, 65 ---
+float(1.5707963116609)
+--- testing: 4294967295, -44 ---
+float(1.5707963370394)
+--- testing: 4294967295, 2147483647 ---
+float(1.1071487178872)
+--- testing: 4294967295, -2147483648 ---
+float(2.0344439358888)
+--- testing: 4294967295, 9223372036854775807 ---
+float(4.6566128719932E-10)
+--- testing: 4294967295, -9223372036854775808 ---
+float(3.1415926531241)
+--- testing: 4294967293, 0 ---
+float(1.5707963267949)
+--- testing: 4294967293, 1 ---
+float(1.5707963265621)
+--- testing: 4294967293, -1 ---
+float(1.5707963270277)
+--- testing: 4294967293, 7 ---
+float(1.5707963251651)
+--- testing: 4294967293, 9 ---
+float(1.5707963246994)
+--- testing: 4294967293, 65 ---
+float(1.5707963116609)
+--- testing: 4294967293, -44 ---
+float(1.5707963370394)
+--- testing: 4294967293, 2147483647 ---
+float(1.107148717701)
+--- testing: 4294967293, -2147483648 ---
+float(2.0344439360751)
+--- testing: 4294967293, 9223372036854775807 ---
+float(4.6566128698248E-10)
+--- testing: 4294967293, -9223372036854775808 ---
+float(3.1415926531241)
+--- testing: 9223372036854775806, 0 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, 1 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, -1 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, 7 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, 9 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, 65 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, -44 ---
+float(1.5707963267949)
+--- testing: 9223372036854775806, 2147483647 ---
+float(1.5707963265621)
+--- testing: 9223372036854775806, -2147483648 ---
+float(1.5707963270277)
+--- testing: 9223372036854775806, 9223372036854775807 ---
+float(0.78539816339745)
+--- testing: 9223372036854775806, -9223372036854775808 ---
+float(2.3561944901923)
+--- testing: 9.2233720368548E+18, 0 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, 1 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, -1 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, 7 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, 9 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, 65 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, -44 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18, 2147483647 ---
+float(1.5707963265621)
+--- testing: 9.2233720368548E+18, -2147483648 ---
+float(1.5707963270277)
+--- testing: 9.2233720368548E+18, 9223372036854775807 ---
+float(0.78539816339745)
+--- testing: 9.2233720368548E+18, -9223372036854775808 ---
+float(2.3561944901923)
+--- testing: -9223372036854775807, 0 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, 1 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, -1 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, 7 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, 9 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, 65 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, -44 ---
+float(-1.5707963267949)
+--- testing: -9223372036854775807, 2147483647 ---
+float(-1.5707963265621)
+--- testing: -9223372036854775807, -2147483648 ---
+float(-1.5707963270277)
+--- testing: -9223372036854775807, 9223372036854775807 ---
+float(-0.78539816339745)
+--- testing: -9223372036854775807, -9223372036854775808 ---
+float(-2.3561944901923)
+--- testing: -9.2233720368548E+18, 0 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, 1 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, -1 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, 7 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, 9 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, 65 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, -44 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18, 2147483647 ---
+float(-1.5707963265621)
+--- testing: -9.2233720368548E+18, -2147483648 ---
+float(-1.5707963270277)
+--- testing: -9.2233720368548E+18, 9223372036854775807 ---
+float(-0.78539816339745)
+--- testing: -9.2233720368548E+18, -9223372036854775808 ---
+float(-2.3561944901923)
+===DONE===
diff --git a/ext/standard/tests/math/atan_basiclong_64bit.phpt b/ext/standard/tests/math/atan_basiclong_64bit.phpt
new file mode 100644
index 0000000000..ffdfe24372
--- /dev/null
+++ b/ext/standard/tests/math/atan_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test atan function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(atan($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(1.5707963267949)
+--- testing: -9223372036854775808 ---
+float(-1.5707963267949)
+--- testing: 2147483647 ---
+float(1.5707963263292)
+--- testing: -2147483648 ---
+float(-1.5707963263292)
+--- testing: 9223372034707292160 ---
+float(1.5707963267949)
+--- testing: -9223372034707292160 ---
+float(-1.5707963267949)
+--- testing: 2147483648 ---
+float(1.5707963263292)
+--- testing: -2147483649 ---
+float(-1.5707963263292)
+--- testing: 4294967294 ---
+float(1.5707963265621)
+--- testing: 4294967295 ---
+float(1.5707963265621)
+--- testing: 4294967293 ---
+float(1.5707963265621)
+--- testing: 9223372036854775806 ---
+float(1.5707963267949)
+--- testing: 9.2233720368548E+18 ---
+float(1.5707963267949)
+--- testing: -9223372036854775807 ---
+float(-1.5707963267949)
+--- testing: -9.2233720368548E+18 ---
+float(-1.5707963267949)
+===DONE===
diff --git a/ext/standard/tests/math/atanh_basiclong_64bit.phpt b/ext/standard/tests/math/atanh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..d7608cad1d
--- /dev/null
+++ b/ext/standard/tests/math/atanh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test atanh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(atanh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(NAN)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(NAN)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(NAN)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(NAN)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(NAN)
+--- testing: 4294967295 ---
+float(NAN)
+--- testing: 4294967293 ---
+float(NAN)
+--- testing: 9223372036854775806 ---
+float(NAN)
+--- testing: 9.2233720368548E+18 ---
+float(NAN)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/bindec_basiclong_64bit.phpt b/ext/standard/tests/math/bindec_basiclong_64bit.phpt
new file mode 100644
index 0000000000..3cc57d5dc4
--- /dev/null
+++ b/ext/standard/tests/math/bindec_basiclong_64bit.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test bindec function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$binLongStrs = array(
+ '0'.str_repeat('1',63),
+ str_repeat('1',64),
+ '0'.str_repeat('1',31),
+ str_repeat('1',32),
+ '0'.str_repeat('1',64),
+ str_repeat('1',65),
+ '0'.str_repeat('1',32),
+ str_repeat('1',33)
+);
+
+
+foreach ($binLongStrs as $strVal) {
+ echo "--- testing: $strVal ---\n";
+ var_dump(bindec($strVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 0111111111111111111111111111111111111111111111111111111111111111 ---
+int(9223372036854775807)
+--- testing: 1111111111111111111111111111111111111111111111111111111111111111 ---
+float(1.844674407371E+19)
+--- testing: 01111111111111111111111111111111 ---
+int(2147483647)
+--- testing: 11111111111111111111111111111111 ---
+int(4294967295)
+--- testing: 01111111111111111111111111111111111111111111111111111111111111111 ---
+float(1.844674407371E+19)
+--- testing: 11111111111111111111111111111111111111111111111111111111111111111 ---
+float(3.6893488147419E+19)
+--- testing: 011111111111111111111111111111111 ---
+int(4294967295)
+--- testing: 111111111111111111111111111111111 ---
+int(8589934591)
+===DONE===
diff --git a/ext/standard/tests/math/ceil_basiclong_64bit.phpt b/ext/standard/tests/math/ceil_basiclong_64bit.phpt
new file mode 100644
index 0000000000..b4c23d85cd
--- /dev/null
+++ b/ext/standard/tests/math/ceil_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test ceil function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(ceil($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808 ---
+float(-9.2233720368548E+18)
+--- testing: 2147483647 ---
+float(2147483647)
+--- testing: -2147483648 ---
+float(-2147483648)
+--- testing: 9223372034707292160 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160 ---
+float(-9.2233720347073E+18)
+--- testing: 2147483648 ---
+float(2147483648)
+--- testing: -2147483649 ---
+float(-2147483649)
+--- testing: 4294967294 ---
+float(4294967294)
+--- testing: 4294967295 ---
+float(4294967295)
+--- testing: 4294967293 ---
+float(4294967293)
+--- testing: 9223372036854775806 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+float(-9.2233720368548E+18)
+--- testing: -9.2233720368548E+18 ---
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/ext/standard/tests/math/cos_basiclong_64bit.phpt b/ext/standard/tests/math/cos_basiclong_64bit.phpt
new file mode 100644
index 0000000000..d9c3c7c1f6
--- /dev/null
+++ b/ext/standard/tests/math/cos_basiclong_64bit.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test cos function : 64bit long tests
+--INI--
+precision=10
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(cos($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(0.01180007651)
+--- testing: -9223372036854775808 ---
+float(0.01180007651)
+--- testing: 2147483647 ---
+float(-0.6888366919)
+--- testing: -2147483648 ---
+float(0.2378161946)
+--- testing: 9223372034707292160 ---
+float(-0.9684363007)
+--- testing: -9223372034707292160 ---
+float(-0.9684363007)
+--- testing: 2147483648 ---
+float(0.2378161946)
+--- testing: -2147483649 ---
+float(0.9458219685)
+--- testing: 4294967294 ---
+float(-0.05100802385)
+--- testing: 4294967295 ---
+float(-0.8679353474)
+--- testing: 4294967293 ---
+float(0.8128158416)
+--- testing: 9223372036854775806 ---
+float(0.01180007651)
+--- testing: 9.223372037E+18 ---
+float(0.01180007651)
+--- testing: -9223372036854775807 ---
+float(0.01180007651)
+--- testing: -9.223372037E+18 ---
+float(0.01180007651)
+===DONE=== \ No newline at end of file
diff --git a/ext/standard/tests/math/cosh_basiclong_64bit.phpt b/ext/standard/tests/math/cosh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..0916839381
--- /dev/null
+++ b/ext/standard/tests/math/cosh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test cosh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(cosh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(INF)
+--- testing: -9223372036854775808 ---
+float(INF)
+--- testing: 2147483647 ---
+float(INF)
+--- testing: -2147483648 ---
+float(INF)
+--- testing: 9223372034707292160 ---
+float(INF)
+--- testing: -9223372034707292160 ---
+float(INF)
+--- testing: 2147483648 ---
+float(INF)
+--- testing: -2147483649 ---
+float(INF)
+--- testing: 4294967294 ---
+float(INF)
+--- testing: 4294967295 ---
+float(INF)
+--- testing: 4294967293 ---
+float(INF)
+--- testing: 9223372036854775806 ---
+float(INF)
+--- testing: 9.2233720368548E+18 ---
+float(INF)
+--- testing: -9223372036854775807 ---
+float(INF)
+--- testing: -9.2233720368548E+18 ---
+float(INF)
+===DONE===
diff --git a/ext/standard/tests/math/decbin_basiclong_64bit.phpt b/ext/standard/tests/math/decbin_basiclong_64bit.phpt
new file mode 100644
index 0000000000..3dc61c4e28
--- /dev/null
+++ b/ext/standard/tests/math/decbin_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test decbin function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(decbin($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+string(63) "111111111111111111111111111111111111111111111111111111111111111"
+--- testing: -9223372036854775808 ---
+string(64) "1000000000000000000000000000000000000000000000000000000000000000"
+--- testing: 2147483647 ---
+string(31) "1111111111111111111111111111111"
+--- testing: -2147483648 ---
+string(64) "1111111111111111111111111111111110000000000000000000000000000000"
+--- testing: 9223372034707292160 ---
+string(63) "111111111111111111111111111111110000000000000000000000000000000"
+--- testing: -9223372034707292160 ---
+string(64) "1000000000000000000000000000000010000000000000000000000000000000"
+--- testing: 2147483648 ---
+string(32) "10000000000000000000000000000000"
+--- testing: -2147483649 ---
+string(64) "1111111111111111111111111111111101111111111111111111111111111111"
+--- testing: 4294967294 ---
+string(32) "11111111111111111111111111111110"
+--- testing: 4294967295 ---
+string(32) "11111111111111111111111111111111"
+--- testing: 4294967293 ---
+string(32) "11111111111111111111111111111101"
+--- testing: 9223372036854775806 ---
+string(63) "111111111111111111111111111111111111111111111111111111111111110"
+--- testing: 9.2233720368548E+18 ---
+string(64) "1000000000000000000000000000000000000000000000000000000000000000"
+--- testing: -9223372036854775807 ---
+string(64) "1000000000000000000000000000000000000000000000000000000000000001"
+--- testing: -9.2233720368548E+18 ---
+string(64) "1000000000000000000000000000000000000000000000000000000000000000"
+===DONE===
diff --git a/ext/standard/tests/math/dechex_basiclong_64bit.phpt b/ext/standard/tests/math/dechex_basiclong_64bit.phpt
new file mode 100644
index 0000000000..40b0879246
--- /dev/null
+++ b/ext/standard/tests/math/dechex_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test dechex function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(dechex($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+string(16) "7fffffffffffffff"
+--- testing: -9223372036854775808 ---
+string(16) "8000000000000000"
+--- testing: 2147483647 ---
+string(8) "7fffffff"
+--- testing: -2147483648 ---
+string(16) "ffffffff80000000"
+--- testing: 9223372034707292160 ---
+string(16) "7fffffff80000000"
+--- testing: -9223372034707292160 ---
+string(16) "8000000080000000"
+--- testing: 2147483648 ---
+string(8) "80000000"
+--- testing: -2147483649 ---
+string(16) "ffffffff7fffffff"
+--- testing: 4294967294 ---
+string(8) "fffffffe"
+--- testing: 4294967295 ---
+string(8) "ffffffff"
+--- testing: 4294967293 ---
+string(8) "fffffffd"
+--- testing: 9223372036854775806 ---
+string(16) "7ffffffffffffffe"
+--- testing: 9.2233720368548E+18 ---
+string(16) "8000000000000000"
+--- testing: -9223372036854775807 ---
+string(16) "8000000000000001"
+--- testing: -9.2233720368548E+18 ---
+string(16) "8000000000000000"
+===DONE===
diff --git a/ext/standard/tests/math/decoct_basiclong_64bit.phpt b/ext/standard/tests/math/decoct_basiclong_64bit.phpt
new file mode 100644
index 0000000000..d7434176db
--- /dev/null
+++ b/ext/standard/tests/math/decoct_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test decoct function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(decoct($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+string(21) "777777777777777777777"
+--- testing: -9223372036854775808 ---
+string(22) "1000000000000000000000"
+--- testing: 2147483647 ---
+string(11) "17777777777"
+--- testing: -2147483648 ---
+string(22) "1777777777760000000000"
+--- testing: 9223372034707292160 ---
+string(21) "777777777760000000000"
+--- testing: -9223372034707292160 ---
+string(22) "1000000000020000000000"
+--- testing: 2147483648 ---
+string(11) "20000000000"
+--- testing: -2147483649 ---
+string(22) "1777777777757777777777"
+--- testing: 4294967294 ---
+string(11) "37777777776"
+--- testing: 4294967295 ---
+string(11) "37777777777"
+--- testing: 4294967293 ---
+string(11) "37777777775"
+--- testing: 9223372036854775806 ---
+string(21) "777777777777777777776"
+--- testing: 9.2233720368548E+18 ---
+string(22) "1000000000000000000000"
+--- testing: -9223372036854775807 ---
+string(22) "1000000000000000000001"
+--- testing: -9.2233720368548E+18 ---
+string(22) "1000000000000000000000"
+===DONE===
diff --git a/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt b/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt
new file mode 100644
index 0000000000..c64627661d
--- /dev/null
+++ b/ext/standard/tests/math/deg2rad_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test deg2rad function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(deg2rad($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(1.6097821017949E+17)
+--- testing: -9223372036854775808 ---
+float(-1.6097821017949E+17)
+--- testing: 2147483647 ---
+float(37480660.272886)
+--- testing: -2147483648 ---
+float(-37480660.290339)
+--- testing: 9223372034707292160 ---
+float(1.6097821014201E+17)
+--- testing: -9223372034707292160 ---
+float(-1.6097821014201E+17)
+--- testing: 2147483648 ---
+float(37480660.290339)
+--- testing: -2147483649 ---
+float(-37480660.307792)
+--- testing: 4294967294 ---
+float(74961320.545771)
+--- testing: 4294967295 ---
+float(74961320.563225)
+--- testing: 4294967293 ---
+float(74961320.528318)
+--- testing: 9223372036854775806 ---
+float(1.6097821017949E+17)
+--- testing: 9.2233720368548E+18 ---
+float(1.6097821017949E+17)
+--- testing: -9223372036854775807 ---
+float(-1.6097821017949E+17)
+--- testing: -9.2233720368548E+18 ---
+float(-1.6097821017949E+17)
+===DONE===
diff --git a/ext/standard/tests/math/exp_basiclong_64bit.phpt b/ext/standard/tests/math/exp_basiclong_64bit.phpt
new file mode 100644
index 0000000000..5156d055a4
--- /dev/null
+++ b/ext/standard/tests/math/exp_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test exp function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(exp($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(INF)
+--- testing: -9223372036854775808 ---
+float(0)
+--- testing: 2147483647 ---
+float(INF)
+--- testing: -2147483648 ---
+float(0)
+--- testing: 9223372034707292160 ---
+float(INF)
+--- testing: -9223372034707292160 ---
+float(0)
+--- testing: 2147483648 ---
+float(INF)
+--- testing: -2147483649 ---
+float(0)
+--- testing: 4294967294 ---
+float(INF)
+--- testing: 4294967295 ---
+float(INF)
+--- testing: 4294967293 ---
+float(INF)
+--- testing: 9223372036854775806 ---
+float(INF)
+--- testing: 9.2233720368548E+18 ---
+float(INF)
+--- testing: -9223372036854775807 ---
+float(0)
+--- testing: -9.2233720368548E+18 ---
+float(0)
+===DONE===
diff --git a/ext/standard/tests/math/expm1_basiclong_64bit.phpt b/ext/standard/tests/math/expm1_basiclong_64bit.phpt
new file mode 100644
index 0000000000..6963976777
--- /dev/null
+++ b/ext/standard/tests/math/expm1_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test expm1 function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(expm1($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(INF)
+--- testing: -9223372036854775808 ---
+float(-1)
+--- testing: 2147483647 ---
+float(INF)
+--- testing: -2147483648 ---
+float(-1)
+--- testing: 9223372034707292160 ---
+float(INF)
+--- testing: -9223372034707292160 ---
+float(-1)
+--- testing: 2147483648 ---
+float(INF)
+--- testing: -2147483649 ---
+float(-1)
+--- testing: 4294967294 ---
+float(INF)
+--- testing: 4294967295 ---
+float(INF)
+--- testing: 4294967293 ---
+float(INF)
+--- testing: 9223372036854775806 ---
+float(INF)
+--- testing: 9.2233720368548E+18 ---
+float(INF)
+--- testing: -9223372036854775807 ---
+float(-1)
+--- testing: -9.2233720368548E+18 ---
+float(-1)
+===DONE===
diff --git a/ext/standard/tests/math/floor_basiclong_64bit.phpt b/ext/standard/tests/math/floor_basiclong_64bit.phpt
new file mode 100644
index 0000000000..65a50fc083
--- /dev/null
+++ b/ext/standard/tests/math/floor_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test floor function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(floor($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808 ---
+float(-9.2233720368548E+18)
+--- testing: 2147483647 ---
+float(2147483647)
+--- testing: -2147483648 ---
+float(-2147483648)
+--- testing: 9223372034707292160 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160 ---
+float(-9.2233720347073E+18)
+--- testing: 2147483648 ---
+float(2147483648)
+--- testing: -2147483649 ---
+float(-2147483649)
+--- testing: 4294967294 ---
+float(4294967294)
+--- testing: 4294967295 ---
+float(4294967295)
+--- testing: 4294967293 ---
+float(4294967293)
+--- testing: 9223372036854775806 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+float(-9.2233720368548E+18)
+--- testing: -9.2233720368548E+18 ---
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/ext/standard/tests/math/fmod_basiclong_64bit.phpt b/ext/standard/tests/math/fmod_basiclong_64bit.phpt
new file mode 100644
index 0000000000..1502b651e2
--- /dev/null
+++ b/ext/standard/tests/math/fmod_basiclong_64bit.phpt
@@ -0,0 +1,364 @@
+--TEST--
+Test fmod function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MIN_32Bit, MAX_64Bit, MIN_64Bit);
+
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal, $otherVal ---\n";
+ var_dump(fmod($longVal, $otherVal));
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807, 0 ---
+float(NAN)
+--- testing: 9223372036854775807, 1 ---
+float(0)
+--- testing: 9223372036854775807, -1 ---
+float(0)
+--- testing: 9223372036854775807, 7 ---
+float(1)
+--- testing: 9223372036854775807, 9 ---
+float(8)
+--- testing: 9223372036854775807, 65 ---
+float(8)
+--- testing: 9223372036854775807, -44 ---
+float(8)
+--- testing: 9223372036854775807, 2147483647 ---
+float(2)
+--- testing: 9223372036854775807, -2147483648 ---
+float(0)
+--- testing: 9223372036854775807, 9223372036854775807 ---
+float(0)
+--- testing: 9223372036854775807, -9223372036854775808 ---
+float(0)
+--- testing: -9223372036854775808, 0 ---
+float(NAN)
+--- testing: -9223372036854775808, 1 ---
+float(-0)
+--- testing: -9223372036854775808, -1 ---
+float(-0)
+--- testing: -9223372036854775808, 7 ---
+float(-1)
+--- testing: -9223372036854775808, 9 ---
+float(-8)
+--- testing: -9223372036854775808, 65 ---
+float(-8)
+--- testing: -9223372036854775808, -44 ---
+float(-8)
+--- testing: -9223372036854775808, 2147483647 ---
+float(-2)
+--- testing: -9223372036854775808, -2147483648 ---
+float(-0)
+--- testing: -9223372036854775808, 9223372036854775807 ---
+float(-0)
+--- testing: -9223372036854775808, -9223372036854775808 ---
+float(-0)
+--- testing: 2147483647, 0 ---
+float(NAN)
+--- testing: 2147483647, 1 ---
+float(0)
+--- testing: 2147483647, -1 ---
+float(0)
+--- testing: 2147483647, 7 ---
+float(1)
+--- testing: 2147483647, 9 ---
+float(1)
+--- testing: 2147483647, 65 ---
+float(62)
+--- testing: 2147483647, -44 ---
+float(23)
+--- testing: 2147483647, 2147483647 ---
+float(0)
+--- testing: 2147483647, -2147483648 ---
+float(2147483647)
+--- testing: 2147483647, 9223372036854775807 ---
+float(2147483647)
+--- testing: 2147483647, -9223372036854775808 ---
+float(2147483647)
+--- testing: -2147483648, 0 ---
+float(NAN)
+--- testing: -2147483648, 1 ---
+float(-0)
+--- testing: -2147483648, -1 ---
+float(-0)
+--- testing: -2147483648, 7 ---
+float(-2)
+--- testing: -2147483648, 9 ---
+float(-2)
+--- testing: -2147483648, 65 ---
+float(-63)
+--- testing: -2147483648, -44 ---
+float(-24)
+--- testing: -2147483648, 2147483647 ---
+float(-1)
+--- testing: -2147483648, -2147483648 ---
+float(-0)
+--- testing: -2147483648, 9223372036854775807 ---
+float(-2147483648)
+--- testing: -2147483648, -9223372036854775808 ---
+float(-2147483648)
+--- testing: 9223372034707292160, 0 ---
+float(NAN)
+--- testing: 9223372034707292160, 1 ---
+float(0)
+--- testing: 9223372034707292160, -1 ---
+float(0)
+--- testing: 9223372034707292160, 7 ---
+float(6)
+--- testing: 9223372034707292160, 9 ---
+float(6)
+--- testing: 9223372034707292160, 65 ---
+float(10)
+--- testing: 9223372034707292160, -44 ---
+float(28)
+--- testing: 9223372034707292160, 2147483647 ---
+float(1)
+--- testing: 9223372034707292160, -2147483648 ---
+float(0)
+--- testing: 9223372034707292160, 9223372036854775807 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, -9223372036854775808 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 0 ---
+float(NAN)
+--- testing: -9223372034707292160, 1 ---
+float(-0)
+--- testing: -9223372034707292160, -1 ---
+float(-0)
+--- testing: -9223372034707292160, 7 ---
+float(-6)
+--- testing: -9223372034707292160, 9 ---
+float(-6)
+--- testing: -9223372034707292160, 65 ---
+float(-10)
+--- testing: -9223372034707292160, -44 ---
+float(-28)
+--- testing: -9223372034707292160, 2147483647 ---
+float(-1)
+--- testing: -9223372034707292160, -2147483648 ---
+float(-0)
+--- testing: -9223372034707292160, 9223372036854775807 ---
+float(-9.2233720347073E+18)
+--- testing: -9223372034707292160, -9223372036854775808 ---
+float(-9.2233720347073E+18)
+--- testing: 2147483648, 0 ---
+float(NAN)
+--- testing: 2147483648, 1 ---
+float(0)
+--- testing: 2147483648, -1 ---
+float(0)
+--- testing: 2147483648, 7 ---
+float(2)
+--- testing: 2147483648, 9 ---
+float(2)
+--- testing: 2147483648, 65 ---
+float(63)
+--- testing: 2147483648, -44 ---
+float(24)
+--- testing: 2147483648, 2147483647 ---
+float(1)
+--- testing: 2147483648, -2147483648 ---
+float(0)
+--- testing: 2147483648, 9223372036854775807 ---
+float(2147483648)
+--- testing: 2147483648, -9223372036854775808 ---
+float(2147483648)
+--- testing: -2147483649, 0 ---
+float(NAN)
+--- testing: -2147483649, 1 ---
+float(-0)
+--- testing: -2147483649, -1 ---
+float(-0)
+--- testing: -2147483649, 7 ---
+float(-3)
+--- testing: -2147483649, 9 ---
+float(-3)
+--- testing: -2147483649, 65 ---
+float(-64)
+--- testing: -2147483649, -44 ---
+float(-25)
+--- testing: -2147483649, 2147483647 ---
+float(-2)
+--- testing: -2147483649, -2147483648 ---
+float(-1)
+--- testing: -2147483649, 9223372036854775807 ---
+float(-2147483649)
+--- testing: -2147483649, -9223372036854775808 ---
+float(-2147483649)
+--- testing: 4294967294, 0 ---
+float(NAN)
+--- testing: 4294967294, 1 ---
+float(0)
+--- testing: 4294967294, -1 ---
+float(0)
+--- testing: 4294967294, 7 ---
+float(2)
+--- testing: 4294967294, 9 ---
+float(2)
+--- testing: 4294967294, 65 ---
+float(59)
+--- testing: 4294967294, -44 ---
+float(2)
+--- testing: 4294967294, 2147483647 ---
+float(0)
+--- testing: 4294967294, -2147483648 ---
+float(2147483646)
+--- testing: 4294967294, 9223372036854775807 ---
+float(4294967294)
+--- testing: 4294967294, -9223372036854775808 ---
+float(4294967294)
+--- testing: 4294967295, 0 ---
+float(NAN)
+--- testing: 4294967295, 1 ---
+float(0)
+--- testing: 4294967295, -1 ---
+float(0)
+--- testing: 4294967295, 7 ---
+float(3)
+--- testing: 4294967295, 9 ---
+float(3)
+--- testing: 4294967295, 65 ---
+float(60)
+--- testing: 4294967295, -44 ---
+float(3)
+--- testing: 4294967295, 2147483647 ---
+float(1)
+--- testing: 4294967295, -2147483648 ---
+float(2147483647)
+--- testing: 4294967295, 9223372036854775807 ---
+float(4294967295)
+--- testing: 4294967295, -9223372036854775808 ---
+float(4294967295)
+--- testing: 4294967293, 0 ---
+float(NAN)
+--- testing: 4294967293, 1 ---
+float(0)
+--- testing: 4294967293, -1 ---
+float(0)
+--- testing: 4294967293, 7 ---
+float(1)
+--- testing: 4294967293, 9 ---
+float(1)
+--- testing: 4294967293, 65 ---
+float(58)
+--- testing: 4294967293, -44 ---
+float(1)
+--- testing: 4294967293, 2147483647 ---
+float(2147483646)
+--- testing: 4294967293, -2147483648 ---
+float(2147483645)
+--- testing: 4294967293, 9223372036854775807 ---
+float(4294967293)
+--- testing: 4294967293, -9223372036854775808 ---
+float(4294967293)
+--- testing: 9223372036854775806, 0 ---
+float(NAN)
+--- testing: 9223372036854775806, 1 ---
+float(0)
+--- testing: 9223372036854775806, -1 ---
+float(0)
+--- testing: 9223372036854775806, 7 ---
+float(1)
+--- testing: 9223372036854775806, 9 ---
+float(8)
+--- testing: 9223372036854775806, 65 ---
+float(8)
+--- testing: 9223372036854775806, -44 ---
+float(8)
+--- testing: 9223372036854775806, 2147483647 ---
+float(2)
+--- testing: 9223372036854775806, -2147483648 ---
+float(0)
+--- testing: 9223372036854775806, 9223372036854775807 ---
+float(0)
+--- testing: 9223372036854775806, -9223372036854775808 ---
+float(0)
+--- testing: 9.2233720368548E+18, 0 ---
+float(NAN)
+--- testing: 9.2233720368548E+18, 1 ---
+float(0)
+--- testing: 9.2233720368548E+18, -1 ---
+float(0)
+--- testing: 9.2233720368548E+18, 7 ---
+float(1)
+--- testing: 9.2233720368548E+18, 9 ---
+float(8)
+--- testing: 9.2233720368548E+18, 65 ---
+float(8)
+--- testing: 9.2233720368548E+18, -44 ---
+float(8)
+--- testing: 9.2233720368548E+18, 2147483647 ---
+float(2)
+--- testing: 9.2233720368548E+18, -2147483648 ---
+float(0)
+--- testing: 9.2233720368548E+18, 9223372036854775807 ---
+float(0)
+--- testing: 9.2233720368548E+18, -9223372036854775808 ---
+float(0)
+--- testing: -9223372036854775807, 0 ---
+float(NAN)
+--- testing: -9223372036854775807, 1 ---
+float(-0)
+--- testing: -9223372036854775807, -1 ---
+float(-0)
+--- testing: -9223372036854775807, 7 ---
+float(-1)
+--- testing: -9223372036854775807, 9 ---
+float(-8)
+--- testing: -9223372036854775807, 65 ---
+float(-8)
+--- testing: -9223372036854775807, -44 ---
+float(-8)
+--- testing: -9223372036854775807, 2147483647 ---
+float(-2)
+--- testing: -9223372036854775807, -2147483648 ---
+float(-0)
+--- testing: -9223372036854775807, 9223372036854775807 ---
+float(-0)
+--- testing: -9223372036854775807, -9223372036854775808 ---
+float(-0)
+--- testing: -9.2233720368548E+18, 0 ---
+float(NAN)
+--- testing: -9.2233720368548E+18, 1 ---
+float(-0)
+--- testing: -9.2233720368548E+18, -1 ---
+float(-0)
+--- testing: -9.2233720368548E+18, 7 ---
+float(-1)
+--- testing: -9.2233720368548E+18, 9 ---
+float(-8)
+--- testing: -9.2233720368548E+18, 65 ---
+float(-8)
+--- testing: -9.2233720368548E+18, -44 ---
+float(-8)
+--- testing: -9.2233720368548E+18, 2147483647 ---
+float(-2)
+--- testing: -9.2233720368548E+18, -2147483648 ---
+float(-0)
+--- testing: -9.2233720368548E+18, 9223372036854775807 ---
+float(-0)
+--- testing: -9.2233720368548E+18, -9223372036854775808 ---
+float(-0)
+===DONE===
diff --git a/ext/standard/tests/math/hexdec_basiclong_64bit.phpt b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt
new file mode 100644
index 0000000000..29c684a155
--- /dev/null
+++ b/ext/standard/tests/math/hexdec_basiclong_64bit.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test hexdec function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$hexLongStrs = array(
+ '7'.str_repeat('f',15),
+ str_repeat('f',16),
+ '7'.str_repeat('f',7),
+ str_repeat('f',8),
+ '7'.str_repeat('f',16),
+ str_repeat('f',18),
+ '7'.str_repeat('f',8),
+ str_repeat('f',9)
+);
+
+
+foreach ($hexLongStrs as $strVal) {
+ echo "--- testing: $strVal ---\n";
+ var_dump(hexdec($strVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 7fffffffffffffff ---
+int(9223372036854775807)
+--- testing: ffffffffffffffff ---
+float(1.844674407371E+19)
+--- testing: 7fffffff ---
+int(2147483647)
+--- testing: ffffffff ---
+int(4294967295)
+--- testing: 7ffffffffffffffff ---
+float(1.4757395258968E+20)
+--- testing: ffffffffffffffffff ---
+float(4.7223664828696E+21)
+--- testing: 7ffffffff ---
+int(34359738367)
+--- testing: fffffffff ---
+int(68719476735)
+===DONE===
diff --git a/ext/standard/tests/math/hypot_basiclong_64bit.phpt b/ext/standard/tests/math/hypot_basiclong_64bit.phpt
new file mode 100644
index 0000000000..241fa9c4e9
--- /dev/null
+++ b/ext/standard/tests/math/hypot_basiclong_64bit.phpt
@@ -0,0 +1,364 @@
+--TEST--
+Test hypot function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MIN_32Bit, MAX_64Bit, MIN_64Bit);
+
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal, $otherVal ---\n";
+ var_dump(hypot($longVal, $otherVal));
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807, 0 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 1 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, -1 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 7 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 9 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 65 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, -44 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775807, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: 9223372036854775807, -9223372036854775808 ---
+float(1.3043817825333E+19)
+--- testing: -9223372036854775808, 0 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 1 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, -1 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 7 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 9 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 65 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, -44 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: -9223372036854775808, -9223372036854775808 ---
+float(1.3043817825333E+19)
+--- testing: 2147483647, 0 ---
+float(2147483647)
+--- testing: 2147483647, 1 ---
+float(2147483647)
+--- testing: 2147483647, -1 ---
+float(2147483647)
+--- testing: 2147483647, 7 ---
+float(2147483647)
+--- testing: 2147483647, 9 ---
+float(2147483647)
+--- testing: 2147483647, 65 ---
+float(2147483647)
+--- testing: 2147483647, -44 ---
+float(2147483647)
+--- testing: 2147483647, 2147483647 ---
+float(3037000498.5618)
+--- testing: 2147483647, -2147483648 ---
+float(3037000499.2689)
+--- testing: 2147483647, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: 2147483647, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: -2147483648, 0 ---
+float(2147483648)
+--- testing: -2147483648, 1 ---
+float(2147483648)
+--- testing: -2147483648, -1 ---
+float(2147483648)
+--- testing: -2147483648, 7 ---
+float(2147483648)
+--- testing: -2147483648, 9 ---
+float(2147483648)
+--- testing: -2147483648, 65 ---
+float(2147483648)
+--- testing: -2147483648, -44 ---
+float(2147483648)
+--- testing: -2147483648, 2147483647 ---
+float(3037000499.2689)
+--- testing: -2147483648, -2147483648 ---
+float(3037000499.976)
+--- testing: -2147483648, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -2147483648, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 9223372034707292160, 0 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 1 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, -1 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 7 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 9 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 65 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, -44 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 2147483647 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, -2147483648 ---
+float(9.2233720347073E+18)
+--- testing: 9223372034707292160, 9223372036854775807 ---
+float(1.3043817823814E+19)
+--- testing: 9223372034707292160, -9223372036854775808 ---
+float(1.3043817823814E+19)
+--- testing: -9223372034707292160, 0 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 1 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, -1 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 7 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 9 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 65 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, -44 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 2147483647 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, -2147483648 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160, 9223372036854775807 ---
+float(1.3043817823814E+19)
+--- testing: -9223372034707292160, -9223372036854775808 ---
+float(1.3043817823814E+19)
+--- testing: 2147483648, 0 ---
+float(2147483648)
+--- testing: 2147483648, 1 ---
+float(2147483648)
+--- testing: 2147483648, -1 ---
+float(2147483648)
+--- testing: 2147483648, 7 ---
+float(2147483648)
+--- testing: 2147483648, 9 ---
+float(2147483648)
+--- testing: 2147483648, 65 ---
+float(2147483648)
+--- testing: 2147483648, -44 ---
+float(2147483648)
+--- testing: 2147483648, 2147483647 ---
+float(3037000499.2689)
+--- testing: 2147483648, -2147483648 ---
+float(3037000499.976)
+--- testing: 2147483648, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: 2147483648, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: -2147483649, 0 ---
+float(2147483649)
+--- testing: -2147483649, 1 ---
+float(2147483649)
+--- testing: -2147483649, -1 ---
+float(2147483649)
+--- testing: -2147483649, 7 ---
+float(2147483649)
+--- testing: -2147483649, 9 ---
+float(2147483649)
+--- testing: -2147483649, 65 ---
+float(2147483649)
+--- testing: -2147483649, -44 ---
+float(2147483649)
+--- testing: -2147483649, 2147483647 ---
+float(3037000499.976)
+--- testing: -2147483649, -2147483648 ---
+float(3037000500.6832)
+--- testing: -2147483649, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -2147483649, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 4294967294, 0 ---
+float(4294967294)
+--- testing: 4294967294, 1 ---
+float(4294967294)
+--- testing: 4294967294, -1 ---
+float(4294967294)
+--- testing: 4294967294, 7 ---
+float(4294967294)
+--- testing: 4294967294, 9 ---
+float(4294967294)
+--- testing: 4294967294, 65 ---
+float(4294967294)
+--- testing: 4294967294, -44 ---
+float(4294967294)
+--- testing: 4294967294, 2147483647 ---
+float(4801919415.2612)
+--- testing: 4294967294, -2147483648 ---
+float(4801919415.7084)
+--- testing: 4294967294, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: 4294967294, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 4294967295, 0 ---
+float(4294967295)
+--- testing: 4294967295, 1 ---
+float(4294967295)
+--- testing: 4294967295, -1 ---
+float(4294967295)
+--- testing: 4294967295, 7 ---
+float(4294967295)
+--- testing: 4294967295, 9 ---
+float(4294967295)
+--- testing: 4294967295, 65 ---
+float(4294967295)
+--- testing: 4294967295, -44 ---
+float(4294967295)
+--- testing: 4294967295, 2147483647 ---
+float(4801919416.1556)
+--- testing: 4294967295, -2147483648 ---
+float(4801919416.6028)
+--- testing: 4294967295, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: 4294967295, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 4294967293, 0 ---
+float(4294967293)
+--- testing: 4294967293, 1 ---
+float(4294967293)
+--- testing: 4294967293, -1 ---
+float(4294967293)
+--- testing: 4294967293, 7 ---
+float(4294967293)
+--- testing: 4294967293, 9 ---
+float(4294967293)
+--- testing: 4294967293, 65 ---
+float(4294967293)
+--- testing: 4294967293, -44 ---
+float(4294967293)
+--- testing: 4294967293, 2147483647 ---
+float(4801919414.3667)
+--- testing: 4294967293, -2147483648 ---
+float(4801919414.8139)
+--- testing: 4294967293, 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: 4294967293, -9223372036854775808 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 0 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 1 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, -1 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 7 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 9 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 65 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, -44 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: 9223372036854775806, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: 9223372036854775806, -9223372036854775808 ---
+float(1.3043817825333E+19)
+--- testing: 9.2233720368548E+18, 0 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 1 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, -1 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 7 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 9 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 65 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, -44 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: 9.2233720368548E+18, -9223372036854775808 ---
+float(1.3043817825333E+19)
+--- testing: -9223372036854775807, 0 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 1 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, -1 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 7 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 9 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 65 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, -44 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: -9223372036854775807, -9223372036854775808 ---
+float(1.3043817825333E+19)
+--- testing: -9.2233720368548E+18, 0 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 1 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, -1 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 7 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 9 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 65 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, -44 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 2147483647 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, -2147483648 ---
+float(9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, 9223372036854775807 ---
+float(1.3043817825333E+19)
+--- testing: -9.2233720368548E+18, -9223372036854775808 ---
+float(1.3043817825333E+19)
+===DONE===
diff --git a/ext/standard/tests/math/is_finite_basiclong_64bit.phpt b/ext/standard/tests/math/is_finite_basiclong_64bit.phpt
new file mode 100644
index 0000000000..bbc43f7349
--- /dev/null
+++ b/ext/standard/tests/math/is_finite_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test is_finite function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(is_finite($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+bool(true)
+--- testing: -9223372036854775808 ---
+bool(true)
+--- testing: 2147483647 ---
+bool(true)
+--- testing: -2147483648 ---
+bool(true)
+--- testing: 9223372034707292160 ---
+bool(true)
+--- testing: -9223372034707292160 ---
+bool(true)
+--- testing: 2147483648 ---
+bool(true)
+--- testing: -2147483649 ---
+bool(true)
+--- testing: 4294967294 ---
+bool(true)
+--- testing: 4294967295 ---
+bool(true)
+--- testing: 4294967293 ---
+bool(true)
+--- testing: 9223372036854775806 ---
+bool(true)
+--- testing: 9.2233720368548E+18 ---
+bool(true)
+--- testing: -9223372036854775807 ---
+bool(true)
+--- testing: -9.2233720368548E+18 ---
+bool(true)
+===DONE===
diff --git a/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt b/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt
new file mode 100644
index 0000000000..ab15ec71f0
--- /dev/null
+++ b/ext/standard/tests/math/is_infinite_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test is_infinite function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(is_infinite($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+bool(false)
+--- testing: -9223372036854775808 ---
+bool(false)
+--- testing: 2147483647 ---
+bool(false)
+--- testing: -2147483648 ---
+bool(false)
+--- testing: 9223372034707292160 ---
+bool(false)
+--- testing: -9223372034707292160 ---
+bool(false)
+--- testing: 2147483648 ---
+bool(false)
+--- testing: -2147483649 ---
+bool(false)
+--- testing: 4294967294 ---
+bool(false)
+--- testing: 4294967295 ---
+bool(false)
+--- testing: 4294967293 ---
+bool(false)
+--- testing: 9223372036854775806 ---
+bool(false)
+--- testing: 9.2233720368548E+18 ---
+bool(false)
+--- testing: -9223372036854775807 ---
+bool(false)
+--- testing: -9.2233720368548E+18 ---
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/math/is_nan_basiclong_64bit.phpt b/ext/standard/tests/math/is_nan_basiclong_64bit.phpt
new file mode 100644
index 0000000000..6f66d6b71e
--- /dev/null
+++ b/ext/standard/tests/math/is_nan_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test is_nan function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(is_nan($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+bool(false)
+--- testing: -9223372036854775808 ---
+bool(false)
+--- testing: 2147483647 ---
+bool(false)
+--- testing: -2147483648 ---
+bool(false)
+--- testing: 9223372034707292160 ---
+bool(false)
+--- testing: -9223372034707292160 ---
+bool(false)
+--- testing: 2147483648 ---
+bool(false)
+--- testing: -2147483649 ---
+bool(false)
+--- testing: 4294967294 ---
+bool(false)
+--- testing: 4294967295 ---
+bool(false)
+--- testing: 4294967293 ---
+bool(false)
+--- testing: 9223372036854775806 ---
+bool(false)
+--- testing: 9.2233720368548E+18 ---
+bool(false)
+--- testing: -9223372036854775807 ---
+bool(false)
+--- testing: -9.2233720368548E+18 ---
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/math/log10_basiclong_64bit.phpt b/ext/standard/tests/math/log10_basiclong_64bit.phpt
new file mode 100644
index 0000000000..be1b7eff7d
--- /dev/null
+++ b/ext/standard/tests/math/log10_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test log10 function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(log10($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(18.964889726831)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(9.3319298653812)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(18.96488972673)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(9.3319298655834)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(9.6329598610452)
+--- testing: 4294967295 ---
+float(9.6329598611463)
+--- testing: 4294967293 ---
+float(9.632959860944)
+--- testing: 9223372036854775806 ---
+float(18.964889726831)
+--- testing: 9.2233720368548E+18 ---
+float(18.964889726831)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/log1p_basiclong_64bit.phpt b/ext/standard/tests/math/log1p_basiclong_64bit.phpt
new file mode 100644
index 0000000000..a0b32bdce9
--- /dev/null
+++ b/ext/standard/tests/math/log1p_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test log1p function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(log1p($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(43.668272375277)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(21.487562597358)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(43.668272375044)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(21.487562597824)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(22.180709777685)
+--- testing: 4294967295 ---
+float(22.180709777918)
+--- testing: 4294967293 ---
+float(22.180709777453)
+--- testing: 9223372036854775806 ---
+float(43.668272375277)
+--- testing: 9.2233720368548E+18 ---
+float(43.668272375277)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/log_basiclong_64bit.phpt b/ext/standard/tests/math/log_basiclong_64bit.phpt
new file mode 100644
index 0000000000..9a8f8a6f1d
--- /dev/null
+++ b/ext/standard/tests/math/log_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test log function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(log($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(43.668272375277)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(21.487562596893)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(43.668272375044)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(21.487562597358)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(22.180709777453)
+--- testing: 4294967295 ---
+float(22.180709777685)
+--- testing: 4294967293 ---
+float(22.18070977722)
+--- testing: 9223372036854775806 ---
+float(43.668272375277)
+--- testing: 9.2233720368548E+18 ---
+float(43.668272375277)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/octdec_basiclong_64bit.phpt b/ext/standard/tests/math/octdec_basiclong_64bit.phpt
new file mode 100644
index 0000000000..651b09db39
--- /dev/null
+++ b/ext/standard/tests/math/octdec_basiclong_64bit.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test octdec function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$octLongStrs = array(
+ '777777777777777777777',
+ '1777777777777777777777',
+ '17777777777',
+ '37777777777',
+ '377777777777777777777777',
+ '17777777777777777777777777',
+ '377777777777',
+ '777777777777',
+);
+
+
+foreach ($octLongStrs as $strVal) {
+ echo "--- testing: $strVal ---\n";
+ var_dump(octdec($strVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 777777777777777777777 ---
+int(9223372036854775807)
+--- testing: 1777777777777777777777 ---
+float(1.844674407371E+19)
+--- testing: 17777777777 ---
+int(2147483647)
+--- testing: 37777777777 ---
+int(4294967295)
+--- testing: 377777777777777777777777 ---
+float(2.3611832414348E+21)
+--- testing: 17777777777777777777777777 ---
+float(7.5557863725914E+22)
+--- testing: 377777777777 ---
+int(34359738367)
+--- testing: 777777777777 ---
+int(68719476735)
+===DONE===
diff --git a/ext/standard/tests/math/pow_basiclong_64bit.phpt b/ext/standard/tests/math/pow_basiclong_64bit.phpt
new file mode 100644
index 0000000000..dfff0f6785
--- /dev/null
+++ b/ext/standard/tests/math/pow_basiclong_64bit.phpt
@@ -0,0 +1,364 @@
+--TEST--
+Test pow function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MIN_32Bit, MAX_64Bit, MIN_64Bit);
+
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal, $otherVal ---\n";
+ var_dump(pow($longVal, $otherVal));
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807, 0 ---
+int(1)
+--- testing: 9223372036854775807, 1 ---
+int(9223372036854775807)
+--- testing: 9223372036854775807, -1 ---
+float(1.0842021724855E-19)
+--- testing: 9223372036854775807, 7 ---
+float(5.6784275335594E+132)
+--- testing: 9223372036854775807, 9 ---
+float(4.8306719037716E+170)
+--- testing: 9223372036854775807, 65 ---
+float(INF)
+--- testing: 9223372036854775807, -44 ---
+float(0)
+--- testing: 9223372036854775807, 2147483647 ---
+float(INF)
+--- testing: 9223372036854775807, -2147483648 ---
+float(0)
+--- testing: 9223372036854775807, 9223372036854775807 ---
+float(INF)
+--- testing: 9223372036854775807, -9223372036854775808 ---
+float(0)
+--- testing: -9223372036854775808, 0 ---
+int(1)
+--- testing: -9223372036854775808, 1 ---
+int(-9223372036854775808)
+--- testing: -9223372036854775808, -1 ---
+float(-1.0842021724855E-19)
+--- testing: -9223372036854775808, 7 ---
+float(-5.6784275335594E+132)
+--- testing: -9223372036854775808, 9 ---
+float(-4.8306719037716E+170)
+--- testing: -9223372036854775808, 65 ---
+float(-INF)
+--- testing: -9223372036854775808, -44 ---
+float(0)
+--- testing: -9223372036854775808, 2147483647 ---
+float(-INF)
+--- testing: -9223372036854775808, -2147483648 ---
+float(0)
+--- testing: -9223372036854775808, 9223372036854775807 ---
+float(-INF)
+--- testing: -9223372036854775808, -9223372036854775808 ---
+float(0)
+--- testing: 2147483647, 0 ---
+int(1)
+--- testing: 2147483647, 1 ---
+int(2147483647)
+--- testing: 2147483647, -1 ---
+float(4.6566128752458E-10)
+--- testing: 2147483647, 7 ---
+float(2.1062458265056E+65)
+--- testing: 2147483647, 9 ---
+float(9.7133444204205E+83)
+--- testing: 2147483647, 65 ---
+float(INF)
+--- testing: 2147483647, -44 ---
+float(0)
+--- testing: 2147483647, 2147483647 ---
+float(INF)
+--- testing: 2147483647, -2147483648 ---
+float(0)
+--- testing: 2147483647, 9223372036854775807 ---
+float(INF)
+--- testing: 2147483647, -9223372036854775808 ---
+float(0)
+--- testing: -2147483648, 0 ---
+int(1)
+--- testing: -2147483648, 1 ---
+int(-2147483648)
+--- testing: -2147483648, -1 ---
+float(-4.6566128730774E-10)
+--- testing: -2147483648, 7 ---
+float(-2.1062458333711E+65)
+--- testing: -2147483648, 9 ---
+float(-9.7133444611286E+83)
+--- testing: -2147483648, 65 ---
+float(-INF)
+--- testing: -2147483648, -44 ---
+float(0)
+--- testing: -2147483648, 2147483647 ---
+float(-INF)
+--- testing: -2147483648, -2147483648 ---
+float(0)
+--- testing: -2147483648, 9223372036854775807 ---
+float(-INF)
+--- testing: -2147483648, -9223372036854775808 ---
+float(0)
+--- testing: 9223372034707292160, 0 ---
+int(1)
+--- testing: 9223372034707292160, 1 ---
+int(9223372034707292160)
+--- testing: 9223372034707292160, -1 ---
+float(1.0842021727379E-19)
+--- testing: 9223372034707292160, 7 ---
+float(5.6784275243046E+132)
+--- testing: 9223372034707292160, 9 ---
+float(4.830671893649E+170)
+--- testing: 9223372034707292160, 65 ---
+float(INF)
+--- testing: 9223372034707292160, -44 ---
+float(0)
+--- testing: 9223372034707292160, 2147483647 ---
+float(INF)
+--- testing: 9223372034707292160, -2147483648 ---
+float(0)
+--- testing: 9223372034707292160, 9223372036854775807 ---
+float(INF)
+--- testing: 9223372034707292160, -9223372036854775808 ---
+float(0)
+--- testing: -9223372034707292160, 0 ---
+int(1)
+--- testing: -9223372034707292160, 1 ---
+int(-9223372034707292160)
+--- testing: -9223372034707292160, -1 ---
+float(-1.0842021727379E-19)
+--- testing: -9223372034707292160, 7 ---
+float(-5.6784275243046E+132)
+--- testing: -9223372034707292160, 9 ---
+float(-4.830671893649E+170)
+--- testing: -9223372034707292160, 65 ---
+float(-INF)
+--- testing: -9223372034707292160, -44 ---
+float(0)
+--- testing: -9223372034707292160, 2147483647 ---
+float(-INF)
+--- testing: -9223372034707292160, -2147483648 ---
+float(0)
+--- testing: -9223372034707292160, 9223372036854775807 ---
+float(-INF)
+--- testing: -9223372034707292160, -9223372036854775808 ---
+float(0)
+--- testing: 2147483648, 0 ---
+int(1)
+--- testing: 2147483648, 1 ---
+int(2147483648)
+--- testing: 2147483648, -1 ---
+float(4.6566128730774E-10)
+--- testing: 2147483648, 7 ---
+float(2.1062458333711E+65)
+--- testing: 2147483648, 9 ---
+float(9.7133444611286E+83)
+--- testing: 2147483648, 65 ---
+float(INF)
+--- testing: 2147483648, -44 ---
+float(0)
+--- testing: 2147483648, 2147483647 ---
+float(INF)
+--- testing: 2147483648, -2147483648 ---
+float(0)
+--- testing: 2147483648, 9223372036854775807 ---
+float(INF)
+--- testing: 2147483648, -9223372036854775808 ---
+float(0)
+--- testing: -2147483649, 0 ---
+int(1)
+--- testing: -2147483649, 1 ---
+int(-2147483649)
+--- testing: -2147483649, -1 ---
+float(-4.656612870909E-10)
+--- testing: -2147483649, 7 ---
+float(-2.1062458402367E+65)
+--- testing: -2147483649, 9 ---
+float(-9.7133445018368E+83)
+--- testing: -2147483649, 65 ---
+float(-INF)
+--- testing: -2147483649, -44 ---
+float(0)
+--- testing: -2147483649, 2147483647 ---
+float(-INF)
+--- testing: -2147483649, -2147483648 ---
+float(0)
+--- testing: -2147483649, 9223372036854775807 ---
+float(-INF)
+--- testing: -2147483649, -9223372036854775808 ---
+float(0)
+--- testing: 4294967294, 0 ---
+int(1)
+--- testing: 4294967294, 1 ---
+int(4294967294)
+--- testing: 4294967294, -1 ---
+float(2.3283064376229E-10)
+--- testing: 4294967294, 7 ---
+float(2.6959946579271E+67)
+--- testing: 4294967294, 9 ---
+float(4.9732323432553E+86)
+--- testing: 4294967294, 65 ---
+float(INF)
+--- testing: 4294967294, -44 ---
+float(0)
+--- testing: 4294967294, 2147483647 ---
+float(INF)
+--- testing: 4294967294, -2147483648 ---
+float(0)
+--- testing: 4294967294, 9223372036854775807 ---
+float(INF)
+--- testing: 4294967294, -9223372036854775808 ---
+float(0)
+--- testing: 4294967295, 0 ---
+int(1)
+--- testing: 4294967295, 1 ---
+int(4294967295)
+--- testing: 4294967295, -1 ---
+float(2.3283064370808E-10)
+--- testing: 4294967295, 7 ---
+float(2.6959946623211E+67)
+--- testing: 4294967295, 9 ---
+float(4.9732323536766E+86)
+--- testing: 4294967295, 65 ---
+float(INF)
+--- testing: 4294967295, -44 ---
+float(0)
+--- testing: 4294967295, 2147483647 ---
+float(INF)
+--- testing: 4294967295, -2147483648 ---
+float(0)
+--- testing: 4294967295, 9223372036854775807 ---
+float(INF)
+--- testing: 4294967295, -9223372036854775808 ---
+float(0)
+--- testing: 4294967293, 0 ---
+int(1)
+--- testing: 4294967293, 1 ---
+int(4294967293)
+--- testing: 4294967293, -1 ---
+float(2.328306438165E-10)
+--- testing: 4294967293, 7 ---
+float(2.6959946535332E+67)
+--- testing: 4294967293, 9 ---
+float(4.973232332834E+86)
+--- testing: 4294967293, 65 ---
+float(INF)
+--- testing: 4294967293, -44 ---
+float(0)
+--- testing: 4294967293, 2147483647 ---
+float(INF)
+--- testing: 4294967293, -2147483648 ---
+float(0)
+--- testing: 4294967293, 9223372036854775807 ---
+float(INF)
+--- testing: 4294967293, -9223372036854775808 ---
+float(0)
+--- testing: 9223372036854775806, 0 ---
+int(1)
+--- testing: 9223372036854775806, 1 ---
+int(9223372036854775806)
+--- testing: 9223372036854775806, -1 ---
+float(1.0842021724855E-19)
+--- testing: 9223372036854775806, 7 ---
+float(5.6784275335594E+132)
+--- testing: 9223372036854775806, 9 ---
+float(4.8306719037716E+170)
+--- testing: 9223372036854775806, 65 ---
+float(INF)
+--- testing: 9223372036854775806, -44 ---
+float(0)
+--- testing: 9223372036854775806, 2147483647 ---
+float(INF)
+--- testing: 9223372036854775806, -2147483648 ---
+float(0)
+--- testing: 9223372036854775806, 9223372036854775807 ---
+float(INF)
+--- testing: 9223372036854775806, -9223372036854775808 ---
+float(0)
+--- testing: 9.2233720368548E+18, 0 ---
+float(1)
+--- testing: 9.2233720368548E+18, 1 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18, -1 ---
+float(1.0842021724855E-19)
+--- testing: 9.2233720368548E+18, 7 ---
+float(5.6784275335594E+132)
+--- testing: 9.2233720368548E+18, 9 ---
+float(4.8306719037716E+170)
+--- testing: 9.2233720368548E+18, 65 ---
+float(INF)
+--- testing: 9.2233720368548E+18, -44 ---
+float(0)
+--- testing: 9.2233720368548E+18, 2147483647 ---
+float(INF)
+--- testing: 9.2233720368548E+18, -2147483648 ---
+float(0)
+--- testing: 9.2233720368548E+18, 9223372036854775807 ---
+float(INF)
+--- testing: 9.2233720368548E+18, -9223372036854775808 ---
+float(0)
+--- testing: -9223372036854775807, 0 ---
+int(1)
+--- testing: -9223372036854775807, 1 ---
+int(-9223372036854775807)
+--- testing: -9223372036854775807, -1 ---
+float(-1.0842021724855E-19)
+--- testing: -9223372036854775807, 7 ---
+float(-5.6784275335594E+132)
+--- testing: -9223372036854775807, 9 ---
+float(-4.8306719037716E+170)
+--- testing: -9223372036854775807, 65 ---
+float(-INF)
+--- testing: -9223372036854775807, -44 ---
+float(0)
+--- testing: -9223372036854775807, 2147483647 ---
+float(-INF)
+--- testing: -9223372036854775807, -2147483648 ---
+float(0)
+--- testing: -9223372036854775807, 9223372036854775807 ---
+float(-INF)
+--- testing: -9223372036854775807, -9223372036854775808 ---
+float(0)
+--- testing: -9.2233720368548E+18, 0 ---
+float(1)
+--- testing: -9.2233720368548E+18, 1 ---
+float(-9.2233720368548E+18)
+--- testing: -9.2233720368548E+18, -1 ---
+float(-1.0842021724855E-19)
+--- testing: -9.2233720368548E+18, 7 ---
+float(-5.6784275335594E+132)
+--- testing: -9.2233720368548E+18, 9 ---
+float(-4.8306719037716E+170)
+--- testing: -9.2233720368548E+18, 65 ---
+float(-INF)
+--- testing: -9.2233720368548E+18, -44 ---
+float(0)
+--- testing: -9.2233720368548E+18, 2147483647 ---
+float(-INF)
+--- testing: -9.2233720368548E+18, -2147483648 ---
+float(0)
+--- testing: -9.2233720368548E+18, 9223372036854775807 ---
+float(INF)
+--- testing: -9.2233720368548E+18, -9223372036854775808 ---
+float(0)
+===DONE===
diff --git a/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt b/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt
new file mode 100644
index 0000000000..4f43ef1368
--- /dev/null
+++ b/ext/standard/tests/math/rad2deg_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test rad2deg function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(rad2deg($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(5.2846029059076E+20)
+--- testing: -9223372036854775808 ---
+float(-5.2846029059076E+20)
+--- testing: 2147483647 ---
+float(123041749546.46)
+--- testing: -2147483648 ---
+float(-123041749603.76)
+--- testing: 9223372034707292160 ---
+float(5.2846029046772E+20)
+--- testing: -9223372034707292160 ---
+float(-5.2846029046772E+20)
+--- testing: 2147483648 ---
+float(123041749603.76)
+--- testing: -2147483649 ---
+float(-123041749661.05)
+--- testing: 4294967294 ---
+float(246083499092.92)
+--- testing: 4294967295 ---
+float(246083499150.22)
+--- testing: 4294967293 ---
+float(246083499035.63)
+--- testing: 9223372036854775806 ---
+float(5.2846029059076E+20)
+--- testing: 9.2233720368548E+18 ---
+float(5.2846029059076E+20)
+--- testing: -9223372036854775807 ---
+float(-5.2846029059076E+20)
+--- testing: -9.2233720368548E+18 ---
+float(-5.2846029059076E+20)
+===DONE===
diff --git a/ext/standard/tests/math/round_basiclong_64bit.phpt b/ext/standard/tests/math/round_basiclong_64bit.phpt
new file mode 100644
index 0000000000..19db12ed81
--- /dev/null
+++ b/ext/standard/tests/math/round_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test round function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(round($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808 ---
+float(-9.2233720368548E+18)
+--- testing: 2147483647 ---
+float(2147483647)
+--- testing: -2147483648 ---
+float(-2147483648)
+--- testing: 9223372034707292160 ---
+float(9.2233720347073E+18)
+--- testing: -9223372034707292160 ---
+float(-9.2233720347073E+18)
+--- testing: 2147483648 ---
+float(2147483648)
+--- testing: -2147483649 ---
+float(-2147483649)
+--- testing: 4294967294 ---
+float(4294967294)
+--- testing: 4294967295 ---
+float(4294967295)
+--- testing: 4294967293 ---
+float(4294967293)
+--- testing: 9223372036854775806 ---
+float(9.2233720368548E+18)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+float(-9.2233720368548E+18)
+--- testing: -9.2233720368548E+18 ---
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/ext/standard/tests/math/sin_basiclong_64bit.phpt b/ext/standard/tests/math/sin_basiclong_64bit.phpt
new file mode 100644
index 0000000000..0f0f087a41
--- /dev/null
+++ b/ext/standard/tests/math/sin_basiclong_64bit.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test sin function : 64bit long tests
+--INI--
+precision=10
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(sin($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(0.9999303767)
+--- testing: -9223372036854775808 ---
+float(-0.9999303767)
+--- testing: 2147483647 ---
+float(-0.7249165551)
+--- testing: -2147483648 ---
+float(0.9713101758)
+--- testing: 9223372034707292160 ---
+float(0.2492611714)
+--- testing: -9223372034707292160 ---
+float(-0.2492611714)
+--- testing: 2147483648 ---
+float(-0.9713101758)
+--- testing: -2147483649 ---
+float(0.3246857002)
+--- testing: 4294967294 ---
+float(0.9986982435)
+--- testing: 4294967295 ---
+float(0.4966771918)
+--- testing: 4294967293 ---
+float(0.5825207359)
+--- testing: 9223372036854775806 ---
+float(0.9999303767)
+--- testing: 9.223372037E+18 ---
+float(0.9999303767)
+--- testing: -9223372036854775807 ---
+float(-0.9999303767)
+--- testing: -9.223372037E+18 ---
+float(-0.9999303767)
+===DONE=== \ No newline at end of file
diff --git a/ext/standard/tests/math/sinh_basiclong_64bit.phpt b/ext/standard/tests/math/sinh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..52068146ea
--- /dev/null
+++ b/ext/standard/tests/math/sinh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test sinh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(sinh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(INF)
+--- testing: -9223372036854775808 ---
+float(-INF)
+--- testing: 2147483647 ---
+float(INF)
+--- testing: -2147483648 ---
+float(-INF)
+--- testing: 9223372034707292160 ---
+float(INF)
+--- testing: -9223372034707292160 ---
+float(-INF)
+--- testing: 2147483648 ---
+float(INF)
+--- testing: -2147483649 ---
+float(-INF)
+--- testing: 4294967294 ---
+float(INF)
+--- testing: 4294967295 ---
+float(INF)
+--- testing: 4294967293 ---
+float(INF)
+--- testing: 9223372036854775806 ---
+float(INF)
+--- testing: 9.2233720368548E+18 ---
+float(INF)
+--- testing: -9223372036854775807 ---
+float(-INF)
+--- testing: -9.2233720368548E+18 ---
+float(-INF)
+===DONE===
diff --git a/ext/standard/tests/math/sqrt_basiclong_64bit.phpt b/ext/standard/tests/math/sqrt_basiclong_64bit.phpt
new file mode 100644
index 0000000000..99091e2c4b
--- /dev/null
+++ b/ext/standard/tests/math/sqrt_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test sqrt function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(sqrt($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(3037000499.976)
+--- testing: -9223372036854775808 ---
+float(NAN)
+--- testing: 2147483647 ---
+float(46340.950001052)
+--- testing: -2147483648 ---
+float(NAN)
+--- testing: 9223372034707292160 ---
+float(3037000499.6225)
+--- testing: -9223372034707292160 ---
+float(NAN)
+--- testing: 2147483648 ---
+float(46340.950011842)
+--- testing: -2147483649 ---
+float(NAN)
+--- testing: 4294967294 ---
+float(65535.999984741)
+--- testing: 4294967295 ---
+float(65535.999992371)
+--- testing: 4294967293 ---
+float(65535.999977112)
+--- testing: 9223372036854775806 ---
+float(3037000499.976)
+--- testing: 9.2233720368548E+18 ---
+float(3037000499.976)
+--- testing: -9223372036854775807 ---
+float(NAN)
+--- testing: -9.2233720368548E+18 ---
+float(NAN)
+===DONE===
diff --git a/ext/standard/tests/math/tan_basiclong_64bit.phpt b/ext/standard/tests/math/tan_basiclong_64bit.phpt
new file mode 100644
index 0000000000..761f86098a
--- /dev/null
+++ b/ext/standard/tests/math/tan_basiclong_64bit.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Test tan function : 64bit long tests
+--INI--
+precision=10
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(tan($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(84.73931297)
+--- testing: -9223372036854775808 ---
+float(-84.73931297)
+--- testing: 2147483647 ---
+float(1.052377964)
+--- testing: -2147483648 ---
+float(4.084289455)
+--- testing: 9223372034707292160 ---
+float(-0.2573852005)
+--- testing: -9223372034707292160 ---
+float(0.2573852005)
+--- testing: 2147483648 ---
+float(-4.084289455)
+--- testing: -2147483649 ---
+float(0.3432841603)
+--- testing: 4294967294 ---
+float(-19.57923809)
+--- testing: 4294967295 ---
+float(-0.5722513702)
+--- testing: 4294967293 ---
+float(0.7166700082)
+--- testing: 9223372036854775806 ---
+float(84.73931297)
+--- testing: 9.223372037E+18 ---
+float(84.73931297)
+--- testing: -9223372036854775807 ---
+float(-84.73931297)
+--- testing: -9.223372037E+18 ---
+float(-84.73931297)
+===DONE=== \ No newline at end of file
diff --git a/ext/standard/tests/math/tanh_basiclong_64bit.phpt b/ext/standard/tests/math/tanh_basiclong_64bit.phpt
new file mode 100644
index 0000000000..02e6c102fe
--- /dev/null
+++ b/ext/standard/tests/math/tanh_basiclong_64bit.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Test tanh function : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(tanh($longVal));
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(1)
+--- testing: -9223372036854775808 ---
+float(-1)
+--- testing: 2147483647 ---
+float(1)
+--- testing: -2147483648 ---
+float(-1)
+--- testing: 9223372034707292160 ---
+float(1)
+--- testing: -9223372034707292160 ---
+float(-1)
+--- testing: 2147483648 ---
+float(1)
+--- testing: -2147483649 ---
+float(-1)
+--- testing: 4294967294 ---
+float(1)
+--- testing: 4294967295 ---
+float(1)
+--- testing: 4294967293 ---
+float(1)
+--- testing: 9223372036854775806 ---
+float(1)
+--- testing: 9.2233720368548E+18 ---
+float(1)
+--- testing: -9223372036854775807 ---
+float(-1)
+--- testing: -9.2233720368548E+18 ---
+float(-1)
+===DONE===