-
Notifications
You must be signed in to change notification settings - Fork 0
Higher transcendental functions
For us a higher transcendental function or an special function is a function that can't be evaluated in the javascript runtime without the aid of numerical algorithms. For example Bessel functions, error function, the Airy function, gamma function...
Those are, at least, important in physics, engineering, chemistry and statistics.
The first thing to note is that regrettably there are no know algorithms to evaluate this functions using double precision and attaining double precision. In simple terms if we want to compute the value of a Bessel function with 15 significant digits we are going to need to perform operations with (say) numbers with 20 significant digits. That is simply a fact of life.
In the javascript runtime we only have doubles at our disposal, if we need a higher precision we are going to need to to design a multi-precision or arbitrary-precision library. That is in the plans, but we will do that at a later stage. For now we shall content ourselves with lower precision that can be attained by the use of doubles. So, for our purposes, we shall be happy to have computations of transcendental function accurate to IEE 754 float arithmetic.
An example function is the error function (see wikipedia entry 1 and NIST 3). For many functions the direct definition is through a Taylor series expansion. This expansions usually work well for very small values of the variable. But they tend to be of very slow convergence.