You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've looked at the polyfill, but I'm not exactly clear on why or how the algorithm is any more precise. 0.1 + 0.2 !== 0.3 still, and while I kinda get that maybe this isn't meant to fix floating point issues like that, I still don't get how this is meant to be any more "precise" than any basic approach. And just a single example of how this would be any more accurate than a staright-forward nums.reduce() highlighting where and how the simple approach is less accurate/precise than this would really do a lot to clarify why the more expensive operations are warranted.
Also worth mentioning that, due to the lack of such examples, many others are confused by this as well. It's not uncommon for devs to assume that this proposal is meant to resolve floating point arithmetic problems, and I don't think it actually resolves the issues many think it does. Again, just giving a quick example or two of where this is and isn't better than the simple approach would go a very long way.
The text was updated successfully, but these errors were encountered:
So let's take my issue here as that difference needing more highlighting, including calling out what it does and does not resolve. I'm not sure if I just glossed over the proposal section because that's typically just where I look for the introduction of the new method rather than such details, or because I had previously seen some prior version where I think this was just Math.sum(...nums) .
Shall we just say that the actual problem this proposal is meant to address should be more explicitly detailed, especially with the emphasis implied by using sumPrecise rather than sum ?
Regardless, the core concept of this issue remains in that it should be more clear and detailed on what it is vs what it is not. This may be considered a duplicate of #14, in fact, but that only shows that the confusion isn't uncommon, and I think that giving a few clear examples of what this is and is not is still worth requesting.
I've looked at the polyfill, but I'm not exactly clear on why or how the algorithm is any more precise.
0.1 + 0.2 !== 0.3
still, and while I kinda get that maybe this isn't meant to fix floating point issues like that, I still don't get how this is meant to be any more "precise" than any basic approach. And just a single example of how this would be any more accurate than a staright-forwardnums.reduce()
highlighting where and how the simple approach is less accurate/precise than this would really do a lot to clarify why the more expensive operations are warranted.Also worth mentioning that, due to the lack of such examples, many others are confused by this as well. It's not uncommon for devs to assume that this proposal is meant to resolve floating point arithmetic problems, and I don't think it actually resolves the issues many think it does. Again, just giving a quick example or two of where this is and isn't better than the simple approach would go a very long way.
The text was updated successfully, but these errors were encountered: