1--TEST-- 2Test sin 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(sin($longVal)); 27} 28 29?> 30--EXPECT-- 31--- testing: 9223372036854775807 --- 32float(0.99993037667344) 33--- testing: -9223372036854775808 --- 34float(-0.99993037667344) 35--- testing: 2147483647 --- 36float(-0.72491655514456) 37--- testing: -2147483648 --- 38float(0.97131017579294) 39--- testing: 9223372034707292160 --- 40float(0.24926117141025) 41--- testing: -9223372034707292160 --- 42float(-0.24926117141025) 43--- testing: 2147483648 --- 44float(-0.97131017579294) 45--- testing: -2147483649 --- 46float(0.32468570024367) 47--- testing: 4294967294 --- 48float(0.99869824346666) 49--- testing: 4294967295 --- 50float(0.49667719175329) 51--- testing: 4294967293 --- 52float(0.58252073586971) 53--- testing: 9223372036854775806 --- 54float(0.99993037667344) 55--- testing: 9.2233720368548E+18 --- 56float(0.99993037667344) 57--- testing: -9223372036854775807 --- 58float(-0.99993037667344) 59--- testing: -9.2233720368548E+18 --- 60float(-0.99993037667344) 61