logical indicating if the result should be scaled
by an exponential factor (typically to avoid under- or over-flow).
Details
By default, when expon.scaled is false, AiryA()
computes the complex Airy function Ai(z) or its derivative
d/dz Ai(z) on deriv=0 or deriv=1
respectively.
When expon.scaled is true, it returns
exp(zta)*Ai(z) or
exp(zta)* d/dz Ai(z),
effectively removing the exponential decay in
-pi/3 < arg(z) < pi/3 and
the exponential growth in
pi/3 < abs(arg(z)) < pi,
where zta=(2/3)*z*sqrt(z).
While the Airy functions Ai(z) and d/dz Ai(z) are
analytic in the whole z plane, the corresponding scaled
functions (for expon.scaled=TRUE) have a cut along the
negative real axis.
By default, when expon.scaled is false, AiryB()
computes the complex Airy function Bi(z) or its derivative
d/dz Bi(z) on deriv=0 or deriv=1
respectively.
When expon.scaled is true, it returns
exp(-abs(Re(zta)))*Bi(z) or
exp(-abs(Re(zta)))* dBi(z)/dz,
to remove the exponential behavior in both the left and right half
planes where, as above,
zta=(2/3)*z*sqrt(z).
Value
a complex or numeric vector of the same length (and class) as z.
Author(s)
Donald E. Amos, Sandia National Laboratories, wrote the original
fortran code.
Martin Maechler did the R interface.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Bessel)
Loading required package: Rmpfr
Loading required package: gmp
Attaching package: 'gmp'
The following objects are masked from 'package:base':
%*%, apply, crossprod, matrix, tcrossprod
C code of R package 'Rmpfr': GMP using 64 bits per limb
Attaching package: 'Rmpfr'
The following objects are masked from 'package:stats':
dbinom, dnorm, dpois, pnorm
The following objects are masked from 'package:base':
cbind, pmax, pmin, rbind
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Bessel/Airy.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Airy
> ### Title: Airy Functions (and Their First Derivative)
> ### Aliases: Airy AiryA AiryB
> ### Keywords: math
>
> ### ** Examples
>
> ## The AiryA() := Ai() function
>
> curve(AiryA, -20, 100, n=1001)
> curve(AiryA, -1, 100, n=1001, log="y")
> curve(AiryA(x, expon.scaled=TRUE), -1, 50, n=1001)
> curve(AiryA(x, expon.scaled=TRUE), 1, 10000, n=1001, log="xy")
There were 50 or more warnings (use warnings() to see the first 50)
>
>
> ## The AiryB() := Bi() function
> curve(AiryB, -20, 2, n=1001); abline(h=0,v=0, col="gray",lty=2)
> curve(AiryB, -1, 20, n=1001, log = "y") # exponential growth (x > 0)
>
> curve(AiryB(x,expon.scaled=TRUE), -1, 20, n=1001)
> curve(AiryB(x,expon.scaled=TRUE), 1, 10000, n=1001, log="x")
>
>
>
>
>
> dev.off()
null device
1
>