Re: Float comparison
| From: | Richard Quadling | Date: | Sat, 03 May 2008 00:14:53 +0000 |
| Subject: | Re: Float comparison | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37417@lists.php.net to get a copy of this message | ||
2008/5/3 Stanislav Malyshev <stas@zend.com>:
> Hi!
>
>
>
> > What about introducing a "money" or "currency" numeric type which
> > guarantees say accuracy to 8DP?
> >
>
> Funny thing - I blogged about it about a year ago:
> http://php100.wordpress.com/2007/03/31/making-with-php/
> There's some interesting discussion in comments about how people solve it.
> --
> Stanislav Malyshev, Zend Software Architect
> stas@zend.com http://www.zend.com/
> (408)253-8829 MSN: stas@zend.com
>
Solvable in userland easily enough, but having a native money type,
especially when dealing with inter-currency conversions, then accuracy
is paramount.
Ha! We often get replies to new features with limited appeal which are
common in other languages of "why don't you use Java instead". Well,
Cobol has VERY good money types. It would strike me as VERY funny to
go back to cobol to do accurate financial calculations.
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"