🤯🚨 BREAKING NEWS 🚨🤯

In a shocking development, new additions to the #ECMAScript standard WILL UNLEASH THE HERETOFORE UNAVAILABLE POWER OF ADDITION _IN JAVASCRIPT_ upon the world!

👉 developer.mozilla.org/en-US/do

Only works in Firefox ATM. Like, Chrome and Safari can't even add numbers currently.

#javascript #webdev

@labria The problem with 0.1 + 0.2 is that the floating-point representations of 0.1 and 0.2 themselves are larger than 0.1 and 0.2; therefore, the result is larger than 0.3. This is down to the way IEEE-754 works and can't be fixed by doing addition differently.

Follow

@sir_pepe @labria

As I understand the documentation, the whole point of sumPrecise is not end with those errors, it is to mitigate the problem when you are adding long lists of numbers.

A really important thing to have if you are making an Excel clone or computing statistics.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.