1--TEST--
2Test asinh function : 64bit long tests
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--INI--
8serialize_precision=14
9--FILE--
10<?php
11
12define("MAX_64Bit", 9223372036854775807);
13define("MAX_32Bit", 2147483647);
14define("MIN_64Bit", -9223372036854775807 - 1);
15define("MIN_32Bit", -2147483647 - 1);
16
17$longVals = array(
18    MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
19    MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
20    MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
21);
22
23
24foreach ($longVals as $longVal) {
25   echo "--- testing: $longVal ---\n";
26   var_dump(asinh($longVal));
27}
28
29?>
30--EXPECT--
31--- testing: 9223372036854775807 ---
32float(44.361419555836)
33--- testing: -9223372036854775808 ---
34float(-44.361419555836)
35--- testing: 2147483647 ---
36float(22.180709777453)
37--- testing: -2147483648 ---
38float(-22.180709777918)
39--- testing: 9223372034707292160 ---
40float(44.361419555604)
41--- testing: -9223372034707292160 ---
42float(-44.361419555604)
43--- testing: 2147483648 ---
44float(22.180709777918)
45--- testing: -2147483649 ---
46float(-22.180709778384)
47--- testing: 4294967294 ---
48float(22.873856958013)
49--- testing: 4294967295 ---
50float(22.873856958245)
51--- testing: 4294967293 ---
52float(22.87385695778)
53--- testing: 9223372036854775806 ---
54float(44.361419555836)
55--- testing: 9.2233720368548E+18 ---
56float(44.361419555836)
57--- testing: -9223372036854775807 ---
58float(-44.361419555836)
59--- testing: -9.2233720368548E+18 ---
60float(-44.361419555836)
61