diff options
author | Stanislav Malyshev <stas@php.net> | 2014-01-26 15:14:16 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-01-26 15:51:17 -0800 |
commit | d5560faaa3595c4aaf46329e4714432c42244503 (patch) | |
tree | b2f9e723443670366b50cc35d1a970cdd20030c1 | |
parent | f49965b487fa6c0cc9512c287beb357d43acfbf5 (diff) | |
download | php-git-d5560faaa3595c4aaf46329e4714432c42244503.tar.gz |
drop precision since trigonometric functions are non-portable
See: http://stackoverflow.com/questions/21212326/floating-point-arithmetic-and-reproducibility
-rw-r--r-- | ext/standard/tests/math/tan_basiclong_64bit.phpt | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/ext/standard/tests/math/tan_basiclong_64bit.phpt b/ext/standard/tests/math/tan_basiclong_64bit.phpt index 8ab083d500..3c8abe9d27 100644 --- a/ext/standard/tests/math/tan_basiclong_64bit.phpt +++ b/ext/standard/tests/math/tan_basiclong_64bit.phpt @@ -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=== + |