Yeah, that's what I mean ;)

That's why I explicitly cited IEEE754 in my reply instead of saying
something like «heh, you know, it's that weird javascript thing with
numbers» :)

On Wed, Jul 8, 2009 at 04:53, RobG<robg...@gmail.com> wrote:
>
>
>
> 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
-- 
Massimo Lombardo
Linux user #437712

Reply via email to