NAG CL Interface
S (Specfun)
Approximations of Special Functions

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

Function
Mark of
Introduction

Purpose
s01bac
Example Text
Example Data
7 nag_specfun_log_shifted
ln1+x
s10aac
Example Text
Example Data
1 nag_specfun_tanh
Hyperbolic tangent, tanh x
s10abc
Example Text
Example Data
1 nag_specfun_sinh
Hyperbolic sine, sinh x
s10acc
Example Text
Example Data
1 nag_specfun_cosh
Hyperbolic cosine, cosh x
s11aac
Example Text
Example Data
1 nag_specfun_arctanh
Inverse hyperbolic tangent, arctanh x
s11abc
Example Text
Example Data
1 nag_specfun_arcsinh
Inverse hyperbolic sine, arcsinh x
s11acc
Example Text
Example Data
1 nag_specfun_arccosh
Inverse hyperbolic cosine, arccosh x
s13aac
Example Text
Example Data
Example Plot
1 nag_specfun_integral_exp
Exponential integral E1x
s13acc
Example Text
Example Data
Example Plot
1 nag_specfun_integral_cos
Cosine integral Cix
s13adc
Example Text
Example Data
Example Plot
1 nag_specfun_integral_sin
Sine integral Six
s14aac
Example Text
Example Data
Example Plot
1 nag_specfun_gamma
Gamma function Γx
s14abc
Example Text
Example Data
Example Plot
1 nag_specfun_gamma_log_real
Log gamma function lnΓx
s14acc
Example Text
Example Data
Example Plot
7 nag_specfun_polygamma
ψx-lnx
s14adc
Example Text
Example Data
7 nag_specfun_polygamma_deriv
Scaled derivatives of ψx
s14aec
Example Text
Example Data
6 nag_specfun_psi_deriv_real
Derivative of the psi function ψx
s14afc
Example Text
Example Data
6 nag_specfun_psi_deriv_complex
Derivative of the psi function ψz
s14agc
Example Text
Example Data
7 nag_specfun_gamma_log_complex
Logarithm of the gamma function lnΓz, complex argument
s14ahc
Example Text
Example Data
Example Plot
9 nag_specfun_gamma_log_scaled_real
Scaled log gamma function lnGx, where Gx=Γx+1/x/ex
s14anc
Example Text
Example Data
27 nag_specfun_gamma_vector
Gamma function, vectorized Γx
s14apc
Example Text
Example Data
27 nag_specfun_gamma_log_real_vector
Log gamma function, vectorized lnΓx
s14bac
Example Text
Example Data
Example Plot
1 nag_specfun_gamma_incomplete
Incomplete gamma functions Pa,x and Qa,x
s14bnc
Example Text
Example Data
27 nag_specfun_gamma_incomplete_vector
Incomplete gamma functions, vectorized Pa,x and Qa,x
s14cbc
Example Text
Example Data
23 nag_specfun_beta_log_real
Logarithm of the beta function lnBa,b
s14ccc
Example Text
Example Data
23 nag_specfun_beta_incomplete
Regularized incomplete beta function Ixa,b and its complement 1-Ix
s14cpc
Example Text
Example Data
27 nag_specfun_beta_log_real_vector
Logarithm of the beta function, vectorized lnBa,b
s14cqc
Example Text
Example Data
27 nag_specfun_beta_incomplete_vector
Regularized incomplete beta function, vectorized Ixa,b and its complement 1-Ix
s15abc
Example Text
Example Data
1 nag_specfun_cdf_normal
Cumulative Normal distribution function Px
s15acc
Example Text
Example Data
1 nag_specfun_compcdf_normal
Complement of cumulative Normal distribution function Qx
s15adc
Example Text
Example Data
1 nag_specfun_erfc_real
Complement of error function erfcx
s15aec
Example Text
Example Data
1 nag_specfun_erf_real
Error function erfx
s15afc
Example Text
Example Data
7 nag_specfun_dawson
Dawson's integral
s15agc
Example Text
Example Data
9 nag_specfun_erfcx_real
Scaled complement of error function, erfcxx
s15apc
Example Text
Example Data
27 nag_specfun_cdf_normal_vector
Cumulative Normal distribution function, vectorized Px
s15aqc
Example Text
Example Data
27 nag_specfun_compcdf_normal_vector
Complement of cumulative Normal distribution function, vectorized Qx
s15arc
Example Text
Example Data
27 nag_specfun_erfc_real_vector
Complement of error function, vectorized erfcx
s15asc
Example Text
Example Data
27 nag_specfun_erf_real_vector
Error function, vectorized erfx
s15atc
Example Text
Example Data
27 nag_specfun_dawson_vector
Dawson's integral, vectorized
s15auc
Example Text
Example Data
27 nag_specfun_erfcx_real_vector
Scaled complement of error function, vectorized erfcxx
s15ddc
Example Text
Example Data
7 nag_specfun_erfc_complex
Scaled complex complement of error function, exp-z2erfc-iz
s15drc
Example Text
Example Data
27 nag_specfun_erfc_complex_vector
Scaled complex complement of error function, vectorized exp-z2erfc-iz
s17acc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_y0_real
Bessel function Y0x
s17adc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_y1_real
Bessel function Y1x
s17aec
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_j0_real
Bessel function J0x
s17afc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_j1_real
Bessel function J1x
s17agc
Example Text
Example Data
Example Plot
1 nag_specfun_airy_ai_real
Airy function Aix
s17ahc
Example Text
Example Data
Example Plot
1 nag_specfun_airy_bi_real
Airy function Bix
s17ajc
Example Text
Example Data
Example Plot
1 nag_specfun_airy_ai_deriv
Airy function Aix
s17akc
Example Text
Example Data
Example Plot
1 nag_specfun_airy_bi_deriv
Airy function Bix
s17alc
Example Text
Example Data
6 nag_specfun_bessel_zeros
Zeros of Bessel functions Jαx, Jαx, Yαx or Yαx
s17aqc
Example Text
Example Data
23 nag_specfun_bessel_y0_real_vector
Bessel function vectorized Y0x
s17arc
Example Text
Example Data
23 nag_specfun_bessel_y1_real_vector
Bessel function vectorized Y1x
s17asc
Example Text
Example Data
23 nag_specfun_bessel_j0_real_vector
Bessel function vectorized J0x
s17atc
Example Text
Example Data
23 nag_specfun_bessel_j1_real_vector
Bessel function vectorized J1x
s17auc
Example Text
Example Data
23 nag_specfun_airy_ai_real_vector
Airy function vectorized Aix
s17avc
Example Text
Example Data
23 nag_specfun_airy_bi_real_vector
Airy function vectorized Bix
s17awc
Example Text
Example Data
23 nag_specfun_airy_ai_deriv_vector
Derivatives of the Airy function, vectorized Aix
s17axc
Example Text
Example Data
23 nag_specfun_airy_bi_deriv_vector
Derivatives of the Airy function, vectorized Bix
s17dcc
Example Text
Example Data
7 nag_specfun_bessel_y_complex
Bessel functions Yν+az, real a0, complex z, ν=0,1,2,
s17dec
Example Text
Example Data
7 nag_specfun_bessel_j_complex
Bessel functions Jν+az, real a0, complex z, ν=0,1,2,
s17dgc
Example Text
Example Data
7 nag_specfun_airy_ai_complex
Airy functions Aiz and Aiz, complex z
s17dhc
Example Text
Example Data
7 nag_specfun_airy_bi_complex
Airy functions Biz and Biz, complex z
s17dlc
Example Text
Example Data
7 nag_specfun_hankel_complex
Hankel functions Hν+ajz, j=1,2, real a0, complex z, ν=0,1,2,
s17gac
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_h0
Struve function of order 0, H0x
s17gbc
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_h1
Struve function of order 1, H1x
s18acc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_k0_real
Modified Bessel function K0x
s18adc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_k1_real
Modified Bessel function K1x
s18aec
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_i0_real
Modified Bessel function I0x
s18afc
Example Text
Example Data
Example Plot
1 nag_specfun_bessel_i1_real
Modified Bessel function I1x
s18aqc
Example Text
Example Data
23 nag_specfun_bessel_k0_real_vector
Modified Bessel function vectorized K0x
s18arc
Example Text
Example Data
23 nag_specfun_bessel_k1_real_vector
Modified Bessel function vectorized K1x
s18asc
Example Text
Example Data
23 nag_specfun_bessel_i0_real_vector
Modified Bessel function vectorized I0x
s18atc
Example Text
Example Data
23 nag_specfun_bessel_i1_real_vector
Modified Bessel function vectorized I1x
s18ccc
Example Text
Example Data
2 nag_specfun_bessel_k0_scaled
Scaled modified Bessel function exK0x
s18cdc
Example Text
Example Data
2 nag_specfun_bessel_k1_scaled
Scaled modified Bessel function exK1x
s18cec
Example Text
Example Data
2 nag_specfun_bessel_i0_scaled
Scaled modified Bessel function e-xI0x
s18cfc
Example Text
Example Data
2 nag_specfun_bessel_i1_scaled
Scaled modified Bessel function e-xI1x
s18cqc
Example Text
Example Data
23 nag_specfun_bessel_k0_scaled_vector
Scaled modified Bessel function vectorized exK0x
s18crc
Example Text
Example Data
23 nag_specfun_bessel_k1_scaled_vector
Scaled modified Bessel function vectorized exK1x
s18csc
Example Text
Example Data
23 nag_specfun_bessel_i0_scaled_vector
Scaled modified Bessel function vectorized e-xI0x
s18ctc
Example Text
Example Data
23 nag_specfun_bessel_i1_scaled_vector
Scaled modified Bessel function vectorized e-xI1x
s18dcc
Example Text
Example Data
7 nag_specfun_bessel_k_complex
Modified Bessel functions Kν+az, real a0, complex z, ν=0,1,2,
s18dec
Example Text
Example Data
7 nag_specfun_bessel_i_complex
Modified Bessel functions Iν+az, real a0, complex z, ν=0,1,2,
s18ecc
Example Text
Example Data
6 nag_bessel_i_nu_scaled
Scaled modified Bessel function e-x Iν/4x
s18edc
Example Text
Example Data
6 nag_bessel_k_nu_scaled
Scaled modified Bessel function exKν/4x
s18eec
Example Text
Example Data
6 nag_bessel_i_nu
Modified Bessel function Iν/4x
s18efc
Example Text
Example Data
6 nag_bessel_k_nu
Modified Bessel function Kν/4x
s18egc
Example Text
Example Data
6 nag_bessel_k_alpha
Modified Bessel functions Kα+nx for real x>0, selected values of α0 and n=0,1,,N
s18ehc
Example Text
Example Data
6 nag_bessel_k_alpha_scaled
Scaled modified Bessel functions exKα+nx for real x>0, selected values of α 0 and n=0,1,,N
s18ejc
Example Text
Example Data
6 nag_bessel_i_alpha
Modified Bessel functions Iα+n-1x or Iα-n+1x for real x0, non-negative α<1 and n=1,2,,N+1
s18ekc
Example Text
Example Data
6 nag_bessel_j_alpha
Bessel functions Jα+n-1x or Jα-n+1x for real x0, non-negative α<1 and n=1,2,,N+1
s18gac
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_l0
Modified Struve function of order 0, L0x
s18gbc
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_l1
Modified Struve function of order 1, L1x
s18gcc
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_i0ml0
The function I0x-L0x, where I0x is a modified Bessel function and L0x is a Struve function
s18gdc
Example Text
Example Data
Example Plot
26.1 nag_specfun_struve_i1ml1
The function I1x-L1x, where I1x is a modified Bessel function and L1x is a Struve function
s18gkc
Example Text
Example Data
7 nag_specfun_bessel_j_seq_complex
Bessel function of the 1st kind Jα±nz
s19aac
Example Text
Example Data
1 nag_specfun_kelvin_ber
Kelvin function berx
s19abc
Example Text
Example Data
1 nag_specfun_kelvin_bei
Kelvin function beix
s19acc
Example Text
Example Data
1 nag_specfun_kelvin_ker
Kelvin function kerx
s19adc
Example Text
Example Data
1 nag_specfun_kelvin_kei
Kelvin function keix
s19anc
Example Text
Example Data
23 nag_specfun_kelvin_ber_vector
Kelvin function vectorized berx
s19apc
Example Text
Example Data
23 nag_specfun_kelvin_bei_vector
Kelvin function vectorized beix
s19aqc
Example Text
Example Data
23 nag_specfun_kelvin_ker_vector
Kelvin function vectorized kerx
s19arc
Example Text
Example Data
23 nag_specfun_kelvin_kei_vector
Kelvin function vectorized keix
s20acc
Example Text
Example Data
Example Plot
1 nag_specfun_fresnel_s
Fresnel integral Sx
s20adc
Example Text
Example Data
Example Plot
1 nag_specfun_fresnel_c
Fresnel integral Cx
s20aqc
Example Text
Example Data
23 nag_specfun_fresnel_s_vector
Fresnel integral vectorized Sx
s20arc
Example Text
Example Data
23 nag_specfun_fresnel_c_vector
Fresnel integral vectorized Cx
s21bac
Example Text
1 nag_specfun_ellipint_symm_1_degen
Degenerate symmetrised elliptic integral of 1st kind RCx,y
s21bbc
Example Text
1 nag_specfun_ellipint_symm_1
Symmetrised elliptic integral of 1st kind RFx,y,z
s21bcc
Example Text
1 nag_specfun_ellipint_symm_2
Symmetrised elliptic integral of 2nd kind RDx,y,z
s21bdc
Example Text
1 nag_specfun_ellipint_symm_3
Symmetrised elliptic integral of 3rd kind RJx,y,z,r
s21bec
Example Text
Example Plot
9 nag_specfun_ellipint_legendre_1
Elliptic integral of 1st kind, Legendre form, Fϕm
s21bfc
Example Text
Example Plot
9 nag_specfun_ellipint_legendre_2
Elliptic integral of 2nd kind, Legendre form, E ϕm
s21bgc
Example Text
9 nag_specfun_ellipint_legendre_3
Elliptic integral of 3rd kind, Legendre form, Π n;ϕm
s21bhc
Example Text
9 nag_specfun_ellipint_complete_1
Complete elliptic integral of 1st kind, Legendre form, K m
s21bjc
Example Text
9 nag_specfun_ellipint_complete_2
Complete elliptic integral of 2nd kind, Legendre form, E m
s21cac
Example Text
Example Data
7 nag_specfun_jacellip_real
Jacobian elliptic functions sn, cn and dn of real argument
s21cbc
Example Text
Example Data
6 nag_specfun_jacellip_complex
Jacobian elliptic functions sn, cn and dn of complex argument
s21ccc
Example Text
Example Data
6 nag_specfun_jactheta_real
Jacobian theta functions with real arguments
s21dac
Example Text
Example Data
6 nag_specfun_ellipint_general_2
Elliptic integrals of the second kind with complex arguments
s22aac
Example Text
Example Data
6 nag_specfun_legendre_p
Legendre and associated Legendre functions of the first kind with real arguments
s22bac
Example Text
24 nag_specfun_hyperg_confl_real
Real confluent hypergeometric function F 1 1 a;b;x
s22bbc
Example Text
24 nag_specfun_hyperg_confl_real_scaled
Real confluent hypergeometric function F 1 1 a;b;x in scaled form
s22bec
Example Text
24 nag_specfun_hyperg_gauss_real
Real Gauss hypergeometric function F1 2 a,b;c;x
s22bfc
Example Text
24 nag_specfun_hyperg_gauss_real_scaled
Real Gauss hypergeometric function F 1 2 a,b; c;x in scaled form
s22cac
Example Text
Example Data
Example Plot
27 nag_specfun_mathieu_ang_periodic_real
Calculates values of real periodic angular Mathieu functions
s30aac
Example Text
Example Data
9 nag_specfun_opt_bsm_price
Black–Scholes–Merton option pricing formula
s30abc
Example Text
Example Data
9 nag_specfun_opt_bsm_greeks
Black–Scholes–Merton option pricing formula with Greeks
s30bac
Example Text
Example Data
9 nag_specfun_opt_lookback_fls_price
Floating-strike lookback option pricing formula in the Black-Scholes-Merton model
s30bbc
Example Text
Example Data
9 nag_specfun_opt_lookback_fls_greeks
Floating-strike lookback option pricing formula with Greeks in the Black-Scholes-Merton model
s30cac
Example Text
Example Data
9 nag_specfun_opt_binary_con_price
Binary option, cash-or-nothing pricing formula
s30cbc
Example Text
Example Data
9 nag_specfun_opt_binary_con_greeks
Binary option, cash-or-nothing pricing formula with Greeks
s30ccc
Example Text
Example Data
9 nag_specfun_opt_binary_aon_price
Binary option, asset-or-nothing pricing formula
s30cdc
Example Text
Example Data
9 nag_specfun_opt_binary_aon_greeks
Binary option, asset-or-nothing pricing formula with Greeks
s30fac
Example Text
Example Data
9 nag_specfun_opt_barrier_std_price
Standard barrier option pricing formula
s30jac
Example Text
Example Data
9 nag_specfun_opt_jumpdiff_merton_price
Jump-diffusion, Merton's model, option pricing formula
s30jbc
Example Text
Example Data
9 nag_specfun_opt_jumpdiff_merton_greeks
Jump-diffusion, Merton's model, option pricing formula with Greeks
s30nac
Example Text
Example Data
9 nag_specfun_opt_heston_price
Heston's model option pricing formula
s30nbc
Example Text
Example Data
23 nag_specfun_opt_heston_greeks
Heston's model option pricing formula with Greeks
s30ncc
Example Text
Example Data
24 nag_specfun_opt_heston_term
Heston's model option pricing with term structure
s30qcc
Example Text
Example Data
9 nag_specfun_opt_amer_bs_price
American option, Bjerksund and Stensland pricing formula
s30sac
Example Text
Example Data
9 nag_specfun_opt_asian_geom_price
Asian option, geometric continuous average rate pricing formula
s30sbc
Example Text
Example Data
9 nag_specfun_opt_asian_geom_greeks
Asian option, geometric continuous average rate pricing formula with Greeks