8 Commits

Author SHA1 Message Date
jos
4b458d1779 Removed redundant imports 2016-10-21 17:58:53 +02:00
jos
22508ed8eb Moved constants in erf to the bottom (doc generator picks the first comment from a function) 2016-10-21 17:57:39 +02:00
Pat Grasso
d2ae67cca3 erf(Infinity) should return 1, not NaN
Likewise, erf(-Infinity) should be -1. This is true for any really large
|x|...say, |x| > 2^53.
2016-10-20 15:54:02 -04:00
Pat Grasso
a71cba9a7d Add TODO comments for future considerations
Specifically, implementation of erfi() (complex error function) and
precision when x is a bignumber.
2016-10-20 15:33:10 -04:00
Pat Grasso
57f082f64d Use internal sign() (Math.sign only in ES2015+) 2016-10-20 15:33:10 -04:00
Pat Grasso
ee41e35b5c Fix erf(bignumber) -> bignumber to return proper value
Note: The precision for the bignumber returned may not be accurate, as
the `erf()` approximation only guarantees precision to a certain degree.
2016-10-20 15:33:10 -04:00
Pat Grasso
80fd73c115 Update submodule index files to include erf 2016-10-20 15:33:09 -04:00
Pat Grasso
6ae793edea Implement erf(x) using W. J. Cody's approximation
Translate the Fortran77 implementation of W. J. Cody's "Rational
Chebyshev Approximations for the Error Function".
Place in new function subdirectory, `function/special`, because this
function doesn't seem to fit into any other category.
2016-10-20 15:33:09 -04:00