Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed floating point behaviour to consistently use double precisi…
…on on all platforms and with all compilers.
- Loading branch information
Christian Seiler
committed
Dec 2, 2008
1 parent
509b50e
commit 2230e80
Showing
6 changed files
with
580 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--TEST-- | ||
Double precision is used for floating point calculations | ||
--FILE-- | ||
<?php | ||
var_dump (0.002877 == 2877.0 / 1000000.0); | ||
var_dump (substr (sprintf ("%.35f", 0.002877), 0, 10)); | ||
?> | ||
--EXPECT-- | ||
bool(true) | ||
unicode(10) "0.00287699" |
Oops, something went wrong.