1--TEST--
2Test tan function : 64bit long tests
3--INI--
4precision=5
5--SKIPIF--
6<?php
7if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
8?>
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(tan($longVal));
27}
28
29?>
30===DONE===
31--EXPECT--
32--- testing: 9223372036854775807 ---
33float(84.739)
34--- testing: -9223372036854775808 ---
35float(-84.739)
36--- testing: 2147483647 ---
37float(1.0524)
38--- testing: -2147483648 ---
39float(4.0843)
40--- testing: 9223372034707292160 ---
41float(-0.25739)
42--- testing: -9223372034707292160 ---
43float(0.25739)
44--- testing: 2147483648 ---
45float(-4.0843)
46--- testing: -2147483649 ---
47float(0.34328)
48--- testing: 4294967294 ---
49float(-19.579)
50--- testing: 4294967295 ---
51float(-0.57225)
52--- testing: 4294967293 ---
53float(0.71667)
54--- testing: 9223372036854775806 ---
55float(84.739)
56--- testing: 9.2234E+18 ---
57float(84.739)
58--- testing: -9223372036854775807 ---
59float(-84.739)
60--- testing: -9.2234E+18 ---
61float(-84.739)
62===DONE===
63
64