note 97557 added to language.types.float
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 26 Apr 2010 06:48:48 +0000 |
| Subject: | note 97557 added to language.types.float | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168637@lists.php.net to get a copy of this message | ||
Calculations involving float types become inaccurate when it deals with numbers with more than
approximately 8 digits long where ever the decimal point is. This is because of how 32bit floats
are commonly stored in memory. This means if you rely on float types while working with tiny
fractions or large numbers, your calculations can end up between tiny fractions to several trillion
off.
This usually won't matter when converting to binary memory storage form and editing many
applications' float memory addresses directly, or dealing with smaller length numbers. But if
you're working with larger scale numbers and decimals, it's best to switch to working with
other types: http://www.php.net/manual/en/refs.math.php
----
Server IP: 69.147.83.197
Probable Submitter: 66.25.188.193
----
Manual Page -- http://www.php.net/manual/en/language.types.float.php
Edit -- https://master.php.net/note/edit/97557
Del: integrated -- https://master.php.net/note/delete/97557/integrated
Del: useless -- https://master.php.net/note/delete/97557/useless
Del: bad code -- https://master.php.net/note/delete/97557/bad+code
Del: spam -- https://master.php.net/note/delete/97557/spam
Del: non-english -- https://master.php.net/note/delete/97557/non-english
Del: in docs -- https://master.php.net/note/delete/97557/in+docs
Del: other reasons-- https://master.php.net/note/delete/97557
Reject -- https://master.php.net/note/reject/97557
Search -- https://master.php.net/manage/user-notes.php