-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
I left a comment on the relevant pull request, but I figured I should make a separate issue, in case nobody sees that one. Ping @pavpanchekha.
A 5th degree Taylor expansion for sinh, as currently used by mathjs, isn’t very accurate when you get away from zero. For instance, with x = 0.99, it has an error of ~1.87e-4 (according to Wolfram Alpha).
As an alternative, you could use the degree 17 Taylor expansion the way the GNU Scientific Library does for the range [-1, 1], or you could e.g. use a Chebyshev series expansion.
Also, it probably makes sense to defer to the native Math.sinh function if it is defined. (Part of ECMAScript 6.)
Reactions are currently unavailable