open up a console in Chrome and type 0.1 + 0.2 and see what Javascript
thinks the answer is

I really wish they would address this in the base language (Javascript).
Though they do have good libraries that address the issue (
https://github.com/MikeMcl/decimal.js).

Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces


On Mon, Mar 19, 2018 at 11:13 AM, Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

Most BL is ADD, SUB, MULT or DIV anyway.
Henrik, open up a console in Chrome and type 0.1 + 0.2 and see what
Javascript thinks the answer is 😊 So already Javascript cannot do the
basic maths you describe, due it only supporting floating point numbers,
without having to implement some fixed point maths library. Try any kind of
date manipulation and you'll find yourself in a similar mess without
resorting to moment.js or some other helper library.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.