Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

airy

Airy function.

SYNOPSIS:

double x, ai, aip, bi, bip;
int airy();
airy(x, _&ai, _&aip, _&bi, _&bip);

DESCRIPTION:

Solution of the differential equation:
y"(x) = xy.
The function returns the two independent solutions Ai, Bi and their first derivatives Ai'(x), Bi'(x).
Evaluation is by power series summation for small x, by rational minimax approximations for large x.

ACCURACY:

Error criterion is absolute when function <= 1, relative when function > 1, except * denotes relative error criterion.
For large negative x, the absolute error increases as x^1.5.
For large positive x, the relative error increases as x^1.5.

Arithmetic  domain   function  # trials      peak         rms
IEEE        -10, 0     Ai        10000       1.6e-15     2.7e-16
IEEE          0, 10    Ai        10000       2.3e-14*    1.8e-15*
IEEE        -10, 0     Ai'       10000       4.6e-15     7.6e-16
IEEE          0, 10    Ai'       10000       1.8e-14*    1.5e-15*
IEEE        -10, 10    Bi        30000       4.2e-15     5.3e-16
IEEE        -10, 10    Bi'       30000       4.9e-15     7.3e-16
DEC         -10, 0     Ai         5000       1.7e-16     2.8e-17
DEC           0, 10    Ai         5000       2.1e-15*    1.7e-16*
DEC         -10, 0     Ai'        5000       4.7e-16     7.8e-17
DEC           0, 10    Ai'       12000       1.8e-15*    1.5e-16*
DEC         -10, 10    Bi        10000       5.5e-16     6.8e-17
DEC         -10, 10    Bi'        7000       5.3e-16     8.7e-17

JavaScript:

var x = 9.50313909;
var a = cephes.airy(x);

Return value: Object
Format: JSON
{
   "result" : integer,
   "ai"  : double,
   "aip" : double.
   "bi"  : double,
   "bip" : double
}