NAG FL Interface
S (Specfun)
Approximations of Special Functions

S (Specfun) Chapter Introduction – A description of the Chapter and an overview of the algorithms available.

Routine
Mark of
Introduction

Purpose
s01baf
Example Text
Example Data
14 nagf_specfun_log_shifted
ln1+x
s01eaf
Example Text
Example Data
14 nagf_specfun_exp_complex
Complex exponential, ez
s07aaf
Example Text
Example Data
1 nagf_specfun_tan
tanx
s09aaf
Example Text
Example Data
1 nagf_specfun_arcsin
arcsinx
s09abf
Example Text
Example Data
3 nagf_specfun_arccos
arccosx
s10aaf
Example Text
Example Data
3 nagf_specfun_tanh
tanhx
s10abf
Example Text
Example Data
4 nagf_specfun_sinh
sinhx
s10acf
Example Text
Example Data
4 nagf_specfun_cosh
coshx
s11aaf
Example Text
Example Data
4 nagf_specfun_arctanh
arctanhx
s11abf
Example Text
Example Data
4 nagf_specfun_arcsinh
arcsinhx
s11acf
Example Text
Example Data
4 nagf_specfun_arccosh
arccoshx
s13aaf
Example Text
Example Data
Example Plot
1 nagf_specfun_integral_exp
Exponential integral E1x
s13acf
Example Text
Example Data
Example Plot
2 nagf_specfun_integral_cos
Cosine integral Cix
s13adf
Example Text
Example Data
Example Plot
5 nagf_specfun_integral_sin
Sine integral Six
s14aaf
Example Text
Example Data
Example Plot
1 nagf_specfun_gamma
Gamma function
s14abf
Example Text
Example Data
Example Plot
8 nagf_specfun_gamma_log_real
Log gamma function, real argument
s14acf
Example Text
Example Data
Example Plot
14 nagf_specfun_polygamma
ψx-lnx
s14adf
Example Text
Example Data
14 nagf_specfun_polygamma_deriv
Scaled derivatives of ψx
s14aef
Example Text
Example Data
20 nagf_specfun_psi_deriv_real
Polygamma function ψnx for real x
s14aff
Example Text
Example Data
20 nagf_specfun_psi_deriv_complex
Polygamma function ψnz for complex z
s14agf
Example Text
Example Data
21 nagf_specfun_gamma_log_complex
Logarithm of the gamma function lnΓz, complex argument
s14ahf
Example Text
Example Data
Example Plot
23 nagf_specfun_gamma_log_scaled_real
Scaled log gamma function
s14anf
Example Text
Example Data
27 nagf_specfun_gamma_vector
Gamma function, vectorized Γx
s14apf
Example Text
Example Data
27 nagf_specfun_gamma_log_real_vector
Log gamma function, vectorized lnΓx
s14baf
Example Text
Example Data
Example Plot
14 nagf_specfun_gamma_incomplete
Incomplete gamma functions Pa,x and Qa,x
s14bnf
Example Text
Example Data
27 nagf_specfun_gamma_incomplete_vector
Incomplete gamma functions, vectorized Pa,x and Qa,x
s14cbf
Example Text
Example Data
24 nagf_specfun_beta_log_real
Logarithm of the beta function lnBa,b
s14ccf
Example Text
Example Data
24 nagf_specfun_beta_incomplete
Regularized incomplete beta function Ixa,b and its complement 1-Ix
s14cpf
Example Text
Example Data
27 nagf_specfun_beta_log_real_vector
Logarithm of the beta function, vectorized lnBa,b
s14cqf
Example Text
Example Data
27 nagf_specfun_beta_incomplete_vector
Regularized incomplete beta function, vectorized Ixa,b and its complement 1-Ix
s15abf
Example Text
Example Data
3 nagf_specfun_cdf_normal
Cumulative Normal distribution function Px
s15acf
Example Text
Example Data
4 nagf_specfun_compcdf_normal
Complement of cumulative Normal distribution function Qx
s15adf
Example Text
Example Data
4 nagf_specfun_erfc_real
Complement of error function erfcx
s15aef
Example Text
Example Data
4 nagf_specfun_erf_real
Error function erfx
s15aff
Example Text
Example Data
7 nagf_specfun_dawson
Dawson's integral
s15agf
Example Text
Example Data
22 nagf_specfun_erfcx_real
Scaled complement of error function, erfcxx
s15apf
Example Text
Example Data
27 nagf_specfun_cdf_normal_vector
Cumulative Normal distribution function, vectorized Px
s15aqf
Example Text
Example Data
27 nagf_specfun_compcdf_normal_vector
Complement of cumulative Normal distribution function, vectorized Qx
s15arf
Example Text
Example Data
27 nagf_specfun_erfc_real_vector
Complement of error function, vectorized erfcx
s15asf
Example Text
Example Data
27 nagf_specfun_erf_real_vector
Error function, vectorized erfx
s15atf
Example Text
Example Data
27 nagf_specfun_dawson_vector
Dawson's integral, vectorized
s15auf
Example Text
Example Data
27 nagf_specfun_erfcx_real_vector
Scaled complement of error function, vectorized erfcxx
s15ddf
Example Text
Example Data
14 nagf_specfun_erfc_complex
Scaled complex complement of error function, exp-z2erfc-iz
s15drf
Example Text
Example Data
27 nagf_specfun_erfc_complex_vector
Scaled complex complement of error function, vectorized exp-z2erfc-iz
s17acf
Example Text
Example Data
Example Plot
1 nagf_specfun_bessel_y0_real
Bessel function Y0x
s17adf
Example Text
Example Data
Example Plot
1 nagf_specfun_bessel_y1_real
Bessel function Y1x
s17aef
Example Text
Example Data
Example Plot
5 nagf_specfun_bessel_j0_real
Bessel function J0x
s17aff
Example Text
Example Data
Example Plot
5 nagf_specfun_bessel_j1_real
Bessel function J1x
s17agf
Example Text
Example Data
Example Plot
8 nagf_specfun_airy_ai_real
Airy function Aix
s17ahf
Example Text
Example Data
Example Plot
8 nagf_specfun_airy_bi_real
Airy function Bix
s17ajf
Example Text
Example Data
Example Plot
8 nagf_specfun_airy_ai_deriv
Airy function Aix
s17akf
Example Text
Example Data
Example Plot
8 nagf_specfun_airy_bi_deriv
Airy function Bix
s17alf
Example Text
Example Data
20 nagf_specfun_bessel_zeros
Zeros of Bessel functions Jαx, Jαx, Yαx or Yαx
s17aqf
Example Text
Example Data
24 nagf_specfun_bessel_y0_real_vector
Bessel function vectorized Y0x
s17arf
Example Text
Example Data
24 nagf_specfun_bessel_y1_real_vector
Bessel function vectorized Y1x
s17asf
Example Text
Example Data
24 nagf_specfun_bessel_j0_real_vector
Bessel function vectorized J0x
s17atf
Example Text
Example Data
24 nagf_specfun_bessel_j1_real_vector
Bessel function vectorized J1x
s17auf
Example Text
Example Data
24 nagf_specfun_airy_ai_real_vector
Airy function vectorized Aix
s17avf
Example Text
Example Data
24 nagf_specfun_airy_bi_real_vector
Airy function vectorized Bix
s17awf
Example Text
Example Data
24 nagf_specfun_airy_ai_deriv_vector
Derivatives of the Airy function, vectorized Aix
s17axf
Example Text
Example Data
24 nagf_specfun_airy_bi_deriv_vector
Derivatives of the Airy function, vectorized Bix
s17dcf
Example Text
Example Data
13 nagf_specfun_bessel_y_complex
Bessel functions Yν+az, real a0, complex z, ν=0,1,2,
s17def
Example Text
Example Data
13 nagf_specfun_bessel_j_complex
Bessel functions Jν+az, real a0, complex z, ν=0,1,2,
s17dgf
Example Text
Example Data
13 nagf_specfun_airy_ai_complex
Airy functions Aiz and Aiz, complex z
s17dhf
Example Text
Example Data
13 nagf_specfun_airy_bi_complex
Airy functions Biz and Biz, complex z
s17dlf
Example Text
Example Data
13 nagf_specfun_hankel_complex
Hankel functions Hν+ajz, j=1,2, real a0, complex z, ν=0,1,2,
s17gaf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_h0
Struve function of order 0, H0x
s17gbf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_h1
Struve function of order 1, H1x
s18acf
Example Text
Example Data
Example Plot
1 nagf_specfun_bessel_k0_real
Modified Bessel function K0x
s18adf
Example Text
Example Data
Example Plot
1 nagf_specfun_bessel_k1_real
Modified Bessel function K1x
s18aef
Example Text
Example Data
Example Plot
5 nagf_specfun_bessel_i0_real
Modified Bessel function I0x
s18aff
Example Text
Example Data
Example Plot
5 nagf_specfun_bessel_i1_real
Modified Bessel function I1x
s18aqf
Example Text
Example Data
24 nagf_specfun_bessel_k0_real_vector
Modified Bessel function vectorized K0x
s18arf
Example Text
Example Data
24 nagf_specfun_bessel_k1_real_vector
Modified Bessel function vectorized K1x
s18asf
Example Text
Example Data
24 nagf_specfun_bessel_i0_real_vector
Modified Bessel function vectorized I0x
s18atf
Example Text
Example Data
24 nagf_specfun_bessel_i1_real_vector
Modified Bessel function vectorized I1x
s18ccf
Example Text
Example Data
10 nagf_specfun_bessel_k0_scaled
Scaled modified Bessel function exK0x
s18cdf
Example Text
Example Data
10 nagf_specfun_bessel_k1_scaled
Scaled modified Bessel function exK1x
s18cef
Example Text
Example Data
10 nagf_specfun_bessel_i0_scaled
Scaled modified Bessel function e-xI0x
s18cff
Example Text
Example Data
10 nagf_specfun_bessel_i1_scaled
Scaled modified Bessel function e-xI1x
s18cqf
Example Text
Example Data
24 nagf_specfun_bessel_k0_scaled_vector
Scaled modified Bessel function vectorized exK0x
s18crf
Example Text
Example Data
24 nagf_specfun_bessel_k1_scaled_vector
Scaled modified Bessel function vectorized exK1x
s18csf
Example Text
Example Data
24 nagf_specfun_bessel_i0_scaled_vector
Scaled modified Bessel function vectorized e-xI0x
s18ctf
Example Text
Example Data
24 nagf_specfun_bessel_i1_scaled_vector
Scaled modified Bessel function vectorized e-xI1x
s18dcf
Example Text
Example Data
13 nagf_specfun_bessel_k_complex
Modified Bessel functions Kν+az, real a0, complex z, ν=0,1,2,
s18def
Example Text
Example Data
13 nagf_specfun_bessel_i_complex
Modified Bessel functions Iν+az, real a0, complex z, ν=0,1,2,
s18gaf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_l0
Modified Struve function of order 0, L0x
s18gbf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_l1
Modified Struve function of order 1, L1x
s18gcf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_i0ml0
The function I0x-L0x, where I0x is a modified Bessel function and L0x is a Struve function
s18gdf
Example Text
Example Data
Example Plot
26.1 nagf_specfun_struve_i1ml1
The function I1x-L1x, where I1x is a modified Bessel function and L1x is a Struve function
s18gkf
Example Text
Example Data
21 nagf_specfun_bessel_j_seq_complex
Bessel function of the 1st kind Jα±nz
s19aaf
Example Text
Example Data
11 nagf_specfun_kelvin_ber
Kelvin function berx
s19abf
Example Text
Example Data
11 nagf_specfun_kelvin_bei
Kelvin function beix
s19acf
Example Text
Example Data
11 nagf_specfun_kelvin_ker
Kelvin function kerx
s19adf
Example Text
Example Data
11 nagf_specfun_kelvin_kei
Kelvin function keix
s19anf
Example Text
Example Data
24 nagf_specfun_kelvin_ber_vector
Kelvin function vectorized berx
s19apf
Example Text
Example Data
24 nagf_specfun_kelvin_bei_vector
Kelvin function vectorized beix
s19aqf
Example Text
Example Data
24 nagf_specfun_kelvin_ker_vector
Kelvin function vectorized kerx
s19arf
Example Text
Example Data
24 nagf_specfun_kelvin_kei_vector
Kelvin function vectorized keix
s20acf
Example Text
Example Data
Example Plot
5 nagf_specfun_fresnel_s
Fresnel integral Sx
s20adf
Example Text
Example Data
Example Plot
5 nagf_specfun_fresnel_c
Fresnel integral Cx
s20aqf
Example Text
Example Data
24 nagf_specfun_fresnel_s_vector
Fresnel integral vectorized Sx
s20arf
Example Text
Example Data
24 nagf_specfun_fresnel_c_vector
Fresnel integral vectorized Cx
s21baf
Example Text
8 nagf_specfun_ellipint_symm_1_degen
Degenerate symmetrised elliptic integral of 1st kind RCx,y
s21bbf
Example Text
8 nagf_specfun_ellipint_symm_1
Symmetrised elliptic integral of 1st kind RFx,y,z
s21bcf
Example Text
8 nagf_specfun_ellipint_symm_2
Symmetrised elliptic integral of 2nd kind RDx,y,z
s21bdf
Example Text
8 nagf_specfun_ellipint_symm_3
Symmetrised elliptic integral of 3rd kind RJx,y,z,r
s21bef
Example Text
Example Plot
22 nagf_specfun_ellipint_legendre_1
Elliptic integral of 1st kind, Legendre form, Fϕm
s21bff
Example Text
Example Plot
22 nagf_specfun_ellipint_legendre_2
Elliptic integral of 2nd kind, Legendre form, E ϕm
s21bgf
Example Text
22 nagf_specfun_ellipint_legendre_3
Elliptic integral of 3rd kind, Legendre form, Π n;ϕm
s21bhf
Example Text
22 nagf_specfun_ellipint_complete_1
Complete elliptic integral of 1st kind, Legendre form, K m
s21bjf
Example Text
22 nagf_specfun_ellipint_complete_2
Complete elliptic integral of 2nd kind, Legendre form, E m
s21caf
Example Text
Example Data
15 nagf_specfun_jacellip_real
Jacobian elliptic functions sn, cn and dn of real argument
s21cbf
Example Text
Example Data
20 nagf_specfun_jacellip_complex
Jacobian elliptic functions sn, cn and dn of complex argument
s21ccf
Example Text
Example Data
20 nagf_specfun_jactheta_real
Jacobian theta functions θkx,q of real argument
s21daf
Example Text
Example Data
20 nagf_specfun_ellipint_general_2
General elliptic integral of 2nd kind Fz,k,a,b of complex argument
s22aaf
Example Text
Example Data
20 nagf_specfun_legendre_p
Legendre functions of 1st kind Pnmx or Pnm¯x
s22baf
Example Text
24 nagf_specfun_hyperg_confl_real
Real confluent hypergeometric function F 1 1 a;b;x
s22bbf
Example Text
24 nagf_specfun_hyperg_confl_real_scaled
Real confluent hypergeometric function F 1 1 a;b;x in scaled form
s22bef
Example Text
25 nagf_specfun_hyperg_gauss_real
Real Gauss hypergeometric function F1 2 a,b;c;x
s22bff
Example Text
25 nagf_specfun_hyperg_gauss_real_scaled
Real Gauss hypergeometric function F 1 2 a,b; c;x in scaled form
s22caf
Example Text
Example Data
Example Plot
27 nagf_specfun_mathieu_ang_periodic_real
Calculates values of real periodic angular Mathieu functions
s30aaf
Example Text
Example Data
22 nagf_specfun_opt_bsm_price
Black–Scholes–Merton option pricing formula
s30abf
Example Text
Example Data
22 nagf_specfun_opt_bsm_greeks
Black–Scholes–Merton option pricing formula with Greeks
s30baf
Example Text
Example Data
22 nagf_specfun_opt_lookback_fls_price
Floating-strike lookback option pricing formula in the Black-Scholes-Merton model
s30bbf
Example Text
Example Data
22 nagf_specfun_opt_lookback_fls_greeks
Floating-strike lookback option pricing formula with Greeks in the Black-Scholes-Merton model
s30caf
Example Text
Example Data
22 nagf_specfun_opt_binary_con_price
Binary option, cash-or-nothing pricing formula
s30cbf
Example Text
Example Data
22 nagf_specfun_opt_binary_con_greeks
Binary option, cash-or-nothing pricing formula with Greeks
s30ccf
Example Text
Example Data
22 nagf_specfun_opt_binary_aon_price
Binary option, asset-or-nothing pricing formula
s30cdf
Example Text
Example Data
22 nagf_specfun_opt_binary_aon_greeks
Binary option, asset-or-nothing pricing formula with Greeks
s30faf
Example Text
Example Data
22 nagf_specfun_opt_barrier_std_price
Standard barrier option pricing formula
s30jaf
Example Text
Example Data
22 nagf_specfun_opt_jumpdiff_merton_price
Jump-diffusion, Merton's model, option pricing formula
s30jbf
Example Text
Example Data
22 nagf_specfun_opt_jumpdiff_merton_greeks
Jump-diffusion, Merton's model, option pricing formula with Greeks
s30naf
Example Text
Example Data
22 nagf_specfun_opt_heston_price
Heston's model option pricing formula
s30nbf
Example Text
Example Data
23 nagf_specfun_opt_heston_greeks
Heston's model option pricing formula with Greeks
s30ncf
Example Text
Example Data
25 nagf_specfun_opt_heston_term
Heston's model option pricing with term structure
s30qcf
Example Text
Example Data
22 nagf_specfun_opt_amer_bs_price
American option, Bjerksund and Stensland pricing formula
s30saf
Example Text
Example Data
22 nagf_specfun_opt_asian_geom_price
Asian option, geometric continuous average rate pricing formula
s30sbf
Example Text
Example Data
22 nagf_specfun_opt_asian_geom_greeks
Asian option, geometric continuous average rate pricing formula with Greeks