]> granicus.if.org Git - php/commitdiff
drop precision since trigonometric functions are non-portable
authorStanislav Malyshev <stas@php.net>
Sun, 26 Jan 2014 23:14:16 +0000 (15:14 -0800)
committerStanislav Malyshev <stas@php.net>
Sun, 26 Jan 2014 23:14:16 +0000 (15:14 -0800)
See: http://stackoverflow.com/questions/21212326/floating-point-arithmetic-and-reproducibility

ext/standard/tests/math/tan_basiclong_64bit.phpt

index 8ab083d5007fe22a9ea7870f219447576520345d..3c8abe9d275c05d03f258fd0bf337dc0317ffef2 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Test tan function : 64bit long tests
+--INI--
+precision=5
 --SKIPIF--
 <?php
 if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
@@ -28,33 +30,34 @@ foreach ($longVals as $longVal) {
 ===DONE===
 --EXPECT--
 --- testing: 9223372036854775807 ---
-float(84.739312968756)
+float(84.739)
 --- testing: -9223372036854775808 ---
-float(-84.739312968756)
+float(-84.739)
 --- testing: 2147483647 ---
-float(1.0523779637351)
+float(1.0524)
 --- testing: -2147483648 ---
-float(4.0842894552986)
+float(4.0843)
 --- testing: 9223372034707292160 ---
-float(-0.25738520049439)
+float(-0.25739)
 --- testing: -9223372034707292160 ---
-float(0.25738520049439)
+float(0.25739)
 --- testing: 2147483648 ---
-float(-4.0842894552986)
+float(-4.0843)
 --- testing: -2147483649 ---
-float(0.34328416030117)
+float(0.34328)
 --- testing: 4294967294 ---
-float(-19.579238091943)
+float(-19.579)
 --- testing: 4294967295 ---
-float(-0.57225137018055)
+float(-0.57225)
 --- testing: 4294967293 ---
-float(0.71667000824652)
+float(0.71667)
 --- testing: 9223372036854775806 ---
-float(84.739312968756)
---- testing: 9.2233720368548E+18 ---
-float(84.739312968756)
+float(84.739)
+--- testing: 9.2234E+18 ---
+float(84.739)
 --- testing: -9223372036854775807 ---
-float(-84.739312968756)
---- testing: -9.2233720368548E+18 ---
-float(-84.739312968756)
+float(-84.739)
+--- testing: -9.2234E+18 ---
+float(-84.739)
 ===DONE===
+