Introduction of SAO.js
SAO.js provides (maybe) strict arithmetic operations for JavaScript.
For example, calculate the following formula in JavaScript.
20.2 - 20 // => 0.1999999999999993
But using SAO.js:
var result = sao.sub(20.2, 20);
sao.finalize(result); // => 0.2
Written by Katsuya Hidaka
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#