Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd epsilon to Basics #238
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
Sep 22, 2016
Member
Consolidated all the math related stuff into the #721 meta issue. Follow along there!
|
Consolidated all the math related stuff into the #721 meta issue. Follow along there! |
evancz
closed this
Sep 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TheSeamau5 commentedMay 5, 2015
Defining an epsilon value is pretty basic need when dealing with arithmetic, especially to define an approximately equal operation (due to floating point errors).
While this can perfectly live in a library, I think it's worth being in the core library in the Basics module.
In JS,
Number.EPSILONis defined as 2.2204460492503130808472633361816E-16, or 2-52.This is not well supported accross browsers, as such, it's worth defining it as a constant directly.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON