On Jul 7, 9:14 pm, Massimo Lombardo <unwiredbr...@gmail.com> wrote:
[...]
> As I see you're dealing with cents, money and stuff, I have to
> remember you that JavaScript use IEEE 754 Floating Points as its own
> internal number type, so 0.1 + 0.2 !== 0.3: people tend to be very
> picky when dealing with money, especially if it's *their* money! :)
>
> So: be careful. And if you're relying on JavaScript logic to handle
> people's money, change programming language, JavaScript is not good at
> it.

The language is not the issue as such, any language using IEEE-754
numbers will have exactly the same problem - certain decimal values
can't be represented exactly.  The solution is to understand the issue
and deal with it, not live in fear.

<URL: http://www.jibbering.com/faq/#binaryNumbers >


--
Rob

Reply via email to