RE: [PHP] Math Weirdness
| From: | Robert Cummings | Date: | Tue, 15 Jul 2008 16:20:16 +0000 |
| Subject: | RE: [PHP] Math Weirdness | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276850@lists.php.net to get a copy of this message | ||
On Tue, 2008-07-15 at 10:16 -0500, Jay Blanchard wrote:
> [snip]
> for most of what the majority of php/script apps deal with, it's
> probably
> safe to assume that addition/subtraction will be safe, but i can think
> of
> numerous examples where this isn't true...
> [/snip]
>
> As demonstrated by the example I provided, just checking the difference
> (or lack thereof) between two floats brought the issue to light.
>
> I think that this falls into the same category that cleaning input data
> does in the fact that it should always be done. While there is a joke
> about "skimming" the diffs it just demonstrates that the mathematical
> constructs we use based on a digital platform leaves room for
> error...and the errors add up really quickly because the platforms are
> so darn much quicker than we are.
So what you're saying is that you've been skimming for a while and the
fruits of your mislabour are adding up?
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP