This function evaluates the Airy function.
AI — Function value. (Output)
X — Argument for which the Airy function is desired. (Input)
Generic: AI (X)
Specific: The specific interface names are S_AI and D_AI.
Single: AI (X)
Double: The double precision name is DAI.
The Airy function Ai(x) is defined to be
The Bessel function K (x) is defined in BSKS.
If , then the answer will have no precision. If , the answer will be less accurate than half precision. Here, ε = AMACH(4) is the machine precision. Finally, x should be less than so the answer does not underflow. Very approximately, , where s = AMACH(1), the smallest representable positive number. If underflows are a problem for large x, then the exponentially scaled routine AIE should be used.
Informational error
Type Code
2 1 The function underflows because X is greater than XMAX, where XMAX = (−3/2 ln(AMACH(1))) 2∕3.
In this example, Ai(−4.9) is computed and printed.
USE AI_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL VALUE, X
! Compute
X = -4.9
VALUE = AI(X)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) X, VALUE
99999 FORMAT (' AI(', F6.3, ') = ', F6.3)
END
AI(-4.900) = 0.375
PHONE: 713.784.3131 FAX:713.781.9260 |