New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more ES6 functions #19

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@minoki
Copy link

minoki commented Mar 3, 2018

Add more ES6 functions, expanding #18. They include:

  • hyperbolic functions and inverses of them
    • acosh, asinh, atanh
    • cosh, sinh, tanh
  • variants of exponential function and logarithms
    • expm1
    • log1p, log10, log2
  • cbrt
  • clz32
  • hypot
  • hypot3
  • sign

Polyfills are provided for the old browesers, but they use naive method for calculation, and subject to loss of precision and undue overflow. People who mind numeric precision should load a better polyfill. (Maybe this should be documented?)

Among Math functions added in ES6, Math.fround is left out, because I think it is of little value without a type like Float32.

matthewleon and others added some commits Nov 19, 2017

Add more ES6 functions, with polyfills for old browsers.
The polyfills use naive method for calculation,
and subject to loss of precision and undue overflow.

If you want precision on old browsers, you should load a better polyfill beforehand.
@athanclark

This comment has been minimized.

Copy link

athanclark commented Jan 10, 2019

Anyone know if this will ever be accepted? @minoki @garyb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment