# NAG CL InterfaceS (Specfun)Approximations of Special Functions

Settings help

CL Name Style:

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

Function
Mark of
Introduction

Purpose
s01bac 7 nag_specfun_log_shifted
$\mathrm{ln}\left(1+x\right)$
s10aac 1 nag_specfun_tanh
Hyperbolic tangent, tanh $x$
s10abc 1 nag_specfun_sinh
Hyperbolic sine, sinh $x$
s10acc 1 nag_specfun_cosh
Hyperbolic cosine, cosh $x$
s11aac 1 nag_specfun_arctanh
Inverse hyperbolic tangent, arctanh $x$
s11abc 1 nag_specfun_arcsinh
Inverse hyperbolic sine, arcsinh $x$
s11acc 1 nag_specfun_arccosh
Inverse hyperbolic cosine, arccosh $x$
s13aac 1 nag_specfun_integral_exp
Exponential integral ${E}_{1}\left(x\right)$
s13acc 1 nag_specfun_integral_cos
Cosine integral $\mathrm{Ci}\left(x\right)$
Sine integral $\mathrm{Si}\left(x\right)$
s14aac 1 nag_specfun_gamma
Gamma function $\Gamma \left(x\right)$
s14abc 1 nag_specfun_gamma_log_real
Log gamma function $\mathrm{ln}\left(\Gamma \left(x\right)\right)$
s14acc 7 nag_specfun_polygamma
$\psi \left(x\right)-\mathrm{ln}x$
Scaled derivatives of $\psi \left(x\right)$
s14aec 6 nag_specfun_psi_deriv_real
Derivative of the psi function $\psi \left(x\right)$
s14afc 6 nag_specfun_psi_deriv_complex
Derivative of the psi function $\psi \left(z\right)$
s14agc 7 nag_specfun_gamma_log_complex
Logarithm of the gamma function $\mathrm{ln}\Gamma \left(z\right)$, complex argument
s14ahc 9 nag_specfun_gamma_log_scaled_real
Scaled log gamma function $\mathrm{ln}G\left(x\right)$, where $G\left(x\right)=\Gamma \left(x+1\right)/{\left(x/e\right)}^{x}$
s14anc 27 nag_specfun_gamma_vector
Gamma function, vectorized $\Gamma \left(x\right)$
s14apc 27 nag_specfun_gamma_log_real_vector
Log gamma function, vectorized $\mathrm{ln}\left(\Gamma \left(x\right)\right)$
s14bac 1 nag_specfun_gamma_incomplete
Incomplete gamma functions $P\left(a,x\right)$ and $Q\left(a,x\right)$
s14bnc 27 nag_specfun_gamma_incomplete_vector
Incomplete gamma functions, vectorized $P\left(a,x\right)$ and $Q\left(a,x\right)$
s14cbc 23 nag_specfun_beta_log_real
Logarithm of the beta function $\mathrm{ln}B\left(a,b\right)$
s14ccc 23 nag_specfun_beta_incomplete
Regularized incomplete beta function ${I}_{x}\left(a,b\right)$ and its complement $1-{I}_{x}$
s14cpc 27 nag_specfun_beta_log_real_vector
Logarithm of the beta function, vectorized $\mathrm{ln}B\left(a,b\right)$
s14cqc 27 nag_specfun_beta_incomplete_vector
Regularized incomplete beta function, vectorized ${I}_{x}\left(a,b\right)$ and its complement $1-{I}_{x}$
s15abc 1 nag_specfun_cdf_normal
Cumulative Normal distribution function $P\left(x\right)$
s15acc 1 nag_specfun_compcdf_normal
Complement of cumulative Normal distribution function $Q\left(x\right)$
Complement of error function $\mathrm{erfc}\left(x\right)$
s15aec 1 nag_specfun_erf_real
Error function $\mathrm{erf}\left(x\right)$
s15afc 7 nag_specfun_dawson
Dawson's integral
s15agc 9 nag_specfun_erfcx_real
Scaled complement of error function, $\mathrm{erfcx}\left(x\right)$
s15apc 27 nag_specfun_cdf_normal_vector
Cumulative Normal distribution function, vectorized $P\left(x\right)$
s15aqc 27 nag_specfun_compcdf_normal_vector
Complement of cumulative Normal distribution function, vectorized $Q\left(x\right)$
s15arc 27 nag_specfun_erfc_real_vector
Complement of error function, vectorized $\mathrm{erfc}\left(x\right)$
s15asc 27 nag_specfun_erf_real_vector
Error function, vectorized $\mathrm{erf}\left(x\right)$
s15atc 27 nag_specfun_dawson_vector
Dawson's integral, vectorized
s15auc 27 nag_specfun_erfcx_real_vector
Scaled complement of error function, vectorized $\mathrm{erfcx}\left(x\right)$
s15ddc 7 nag_specfun_erfc_complex
Scaled complex complement of error function, $\mathrm{exp}\left(-{z}^{2}\right)\mathrm{erfc}\left(-iz\right)$
s15drc 27 nag_specfun_erfc_complex_vector
Scaled complex complement of error function, vectorized $\mathrm{exp}\left(-{z}^{2}\right)\mathrm{erfc}\left(-iz\right)$
s17acc 1 nag_specfun_bessel_y0_real
Bessel function ${Y}_{0}\left(x\right)$
Bessel function ${Y}_{1}\left(x\right)$
s17aec 1 nag_specfun_bessel_j0_real
Bessel function ${J}_{0}\left(x\right)$
s17afc 1 nag_specfun_bessel_j1_real
Bessel function ${J}_{1}\left(x\right)$
s17agc 1 nag_specfun_airy_ai_real
Airy function $\mathrm{Ai}\left(x\right)$
s17ahc 1 nag_specfun_airy_bi_real
Airy function $\mathrm{Bi}\left(x\right)$
s17ajc 1 nag_specfun_airy_ai_deriv
Airy function ${\mathrm{Ai}}^{\prime }\left(x\right)$
s17akc 1 nag_specfun_airy_bi_deriv
Airy function ${\mathrm{Bi}}^{\prime }\left(x\right)$
s17alc 6 nag_specfun_bessel_zeros
Zeros of Bessel functions ${J}_{\alpha }\left(x\right)$, ${J}_{\alpha }^{\prime }\left(x\right)$, ${Y}_{\alpha }\left(x\right)$ or ${Y}_{\alpha }^{\prime }\left(x\right)$
s17aqc 23 nag_specfun_bessel_y0_real_vector
Bessel function vectorized ${Y}_{0}\left(x\right)$
s17arc 23 nag_specfun_bessel_y1_real_vector
Bessel function vectorized ${Y}_{1}\left(x\right)$
s17asc 23 nag_specfun_bessel_j0_real_vector
Bessel function vectorized ${J}_{0}\left(x\right)$
s17atc 23 nag_specfun_bessel_j1_real_vector
Bessel function vectorized ${J}_{1}\left(x\right)$
s17auc 23 nag_specfun_airy_ai_real_vector
Airy function vectorized $\mathrm{Ai}\left(x\right)$
s17avc 23 nag_specfun_airy_bi_real_vector
Airy function vectorized $\mathrm{Bi}\left(x\right)$
s17awc 23 nag_specfun_airy_ai_deriv_vector
Derivatives of the Airy function, vectorized ${\mathrm{Ai}}^{\prime }\left(x\right)$
s17axc 23 nag_specfun_airy_bi_deriv_vector
Derivatives of the Airy function, vectorized ${\mathrm{Bi}}^{\prime }\left(x\right)$
s17dcc 7 nag_specfun_bessel_y_complex
Bessel functions ${Y}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s17dec 7 nag_specfun_bessel_j_complex
Bessel functions ${J}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s17dgc 7 nag_specfun_airy_ai_complex
Airy functions $\mathrm{Ai}\left(z\right)$ and ${\mathrm{Ai}}^{\prime }\left(z\right)$, complex $z$
s17dhc 7 nag_specfun_airy_bi_complex
Airy functions $\mathrm{Bi}\left(z\right)$ and ${\mathrm{Bi}}^{\prime }\left(z\right)$, complex $z$
s17dlc 7 nag_specfun_hankel_complex
Hankel functions ${H}_{\nu +a}^{\left(j\right)}\left(z\right)$, $j=1,2$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s17gac 26.1 nag_specfun_struve_h0
Struve function of order $0$, ${H}_{0}\left(x\right)$
s17gbc 26.1 nag_specfun_struve_h1
Struve function of order $1$, ${H}_{1}\left(x\right)$
s18acc 1 nag_specfun_bessel_k0_real
Modified Bessel function ${K}_{0}\left(x\right)$
Modified Bessel function ${K}_{1}\left(x\right)$
s18aec 1 nag_specfun_bessel_i0_real
Modified Bessel function ${I}_{0}\left(x\right)$
s18afc 1 nag_specfun_bessel_i1_real
Modified Bessel function ${I}_{1}\left(x\right)$
s18aqc 23 nag_specfun_bessel_k0_real_vector
Modified Bessel function vectorized ${K}_{0}\left(x\right)$
s18arc 23 nag_specfun_bessel_k1_real_vector
Modified Bessel function vectorized ${K}_{1}\left(x\right)$
s18asc 23 nag_specfun_bessel_i0_real_vector
Modified Bessel function vectorized ${I}_{0}\left(x\right)$
s18atc 23 nag_specfun_bessel_i1_real_vector
Modified Bessel function vectorized ${I}_{1}\left(x\right)$
s18ccc 2 nag_specfun_bessel_k0_scaled
Scaled modified Bessel function ${e}^{x}{K}_{0}\left(x\right)$
s18cdc 2 nag_specfun_bessel_k1_scaled
Scaled modified Bessel function ${e}^{x}{K}_{1}\left(x\right)$
s18cec 2 nag_specfun_bessel_i0_scaled
Scaled modified Bessel function ${e}^{-|x|}{I}_{0}\left(x\right)$
s18cfc 2 nag_specfun_bessel_i1_scaled
Scaled modified Bessel function ${e}^{-|x|}{I}_{1}\left(x\right)$
s18cqc 23 nag_specfun_bessel_k0_scaled_vector
Scaled modified Bessel function vectorized ${e}^{x}{K}_{0}\left(x\right)$
s18crc 23 nag_specfun_bessel_k1_scaled_vector
Scaled modified Bessel function vectorized ${e}^{x}{K}_{1}\left(x\right)$
s18csc 23 nag_specfun_bessel_i0_scaled_vector
Scaled modified Bessel function vectorized ${e}^{-|x|}{I}_{0}\left(x\right)$
s18ctc 23 nag_specfun_bessel_i1_scaled_vector
Scaled modified Bessel function vectorized ${e}^{-|x|}{I}_{1}\left(x\right)$
s18dcc 7 nag_specfun_bessel_k_complex
Modified Bessel functions ${K}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s18dec 7 nag_specfun_bessel_i_complex
Modified Bessel functions ${I}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s18ecc 6 nag_bessel_i_nu_scaled
Scaled modified Bessel function ${e}^{-x}{I}_{\nu /4}\left(x\right)$
s18edc 6 nag_bessel_k_nu_scaled
Scaled modified Bessel function ${e}^{x}{K}_{\nu /4}\left(x\right)$
s18eec 6 nag_bessel_i_nu
Modified Bessel function ${I}_{\nu /4}\left(x\right)$
s18efc 6 nag_bessel_k_nu
Modified Bessel function ${K}_{\nu /4}\left(x\right)$
s18egc 6 nag_bessel_k_alpha
Modified Bessel functions ${K}_{\alpha +n}\left(x\right)$ for real $x>0$, selected values of $\alpha \ge 0$ and $n=0,1,\dots ,N$
s18ehc 6 nag_bessel_k_alpha_scaled
Scaled modified Bessel functions ${e}^{x}{K}_{\alpha +n}\left(x\right)$ for real $x>0$, selected values of $\alpha \ge 0$ and $n=0,1,\dots ,N$
s18ejc 6 nag_bessel_i_alpha
Modified Bessel functions ${I}_{\alpha +n-1}\left(x\right)$ or ${I}_{\alpha -n+1}\left(x\right)$ for real $x\ne 0$, non-negative $\alpha <1$ and $n=1,2,\dots ,|N|+1$
s18ekc 6 nag_bessel_j_alpha
Bessel functions ${J}_{\alpha +n-1}\left(x\right)$ or ${J}_{\alpha -n+1}\left(x\right)$ for real $x\ne 0$, non-negative $\alpha <1$ and $n=1,2,\dots ,|N|+1$
s18gac 26.1 nag_specfun_struve_l0
Modified Struve function of order $0$, ${L}_{0}\left(x\right)$
s18gbc 26.1 nag_specfun_struve_l1
Modified Struve function of order $1$, ${L}_{1}\left(x\right)$
s18gcc 26.1 nag_specfun_struve_i0ml0
The function ${I}_{0}\left(x\right)-{L}_{0}\left(x\right)$, where ${I}_{0}\left(x\right)$ is a modified Bessel function and ${L}_{0}\left(x\right)$ is a Struve function
s18gdc 26.1 nag_specfun_struve_i1ml1
The function ${I}_{1}\left(x\right)-{L}_{1}\left(x\right)$, where ${I}_{1}\left(x\right)$ is a modified Bessel function and ${L}_{1}\left(x\right)$ is a Struve function
s18gkc 7 nag_specfun_bessel_j_seq_complex
Bessel function of the 1st kind ${J}_{\alpha ±n}\left(z\right)$
s19aac 1 nag_specfun_kelvin_ber
Kelvin function $\mathrm{ber}x$
s19abc 1 nag_specfun_kelvin_bei
Kelvin function $\mathrm{bei}x$
s19acc 1 nag_specfun_kelvin_ker
Kelvin function $\mathrm{ker}x$
Kelvin function $\mathrm{kei}x$
s19anc 23 nag_specfun_kelvin_ber_vector
Kelvin function vectorized $\mathrm{ber}x$
s19apc 23 nag_specfun_kelvin_bei_vector
Kelvin function vectorized $\mathrm{bei}x$
s19aqc 23 nag_specfun_kelvin_ker_vector
Kelvin function vectorized $\mathrm{ker}x$
s19arc 23 nag_specfun_kelvin_kei_vector
Kelvin function vectorized $\mathrm{kei}x$
s20acc 1 nag_specfun_fresnel_s
Fresnel integral $S\left(x\right)$
Fresnel integral $C\left(x\right)$
s20aqc 23 nag_specfun_fresnel_s_vector
Fresnel integral vectorized $S\left(x\right)$
s20arc 23 nag_specfun_fresnel_c_vector
Fresnel integral vectorized $C\left(x\right)$
s21bac 1 nag_specfun_ellipint_symm_1_degen
Degenerate symmetrised elliptic integral of 1st kind ${R}_{C}\left(x,y\right)$
s21bbc 1 nag_specfun_ellipint_symm_1
Symmetrised elliptic integral of 1st kind ${R}_{F}\left(x,y,z\right)$
s21bcc 1 nag_specfun_ellipint_symm_2
Symmetrised elliptic integral of 2nd kind ${R}_{D}\left(x,y,z\right)$
s21bdc 1 nag_specfun_ellipint_symm_3
Symmetrised elliptic integral of 3rd kind ${R}_{J}\left(x,y,z,r\right)$
s21bec 9 nag_specfun_ellipint_legendre_1
Elliptic integral of 1st kind, Legendre form, $F\left(\varphi \mid m\right)$
s21bfc 9 nag_specfun_ellipint_legendre_2
Elliptic integral of 2nd kind, Legendre form, $E\left(\varphi \mid m\right)$
s21bgc 9 nag_specfun_ellipint_legendre_3
Elliptic integral of 3rd kind, Legendre form, $\Pi \left(n;\varphi \mid m\right)$
s21bhc 9 nag_specfun_ellipint_complete_1
Complete elliptic integral of 1st kind, Legendre form, $K\left(m\right)$
s21bjc 9 nag_specfun_ellipint_complete_2
Complete elliptic integral of 2nd kind, Legendre form, $E\left(m\right)$
s21cac 7 nag_specfun_jacellip_real
Jacobian elliptic functions sn, cn and dn of real argument
s21cbc 6 nag_specfun_jacellip_complex
Jacobian elliptic functions sn, cn and dn of complex argument
s21ccc 6 nag_specfun_jactheta_real
Jacobian theta functions with real arguments
s21dac 6 nag_specfun_ellipint_general_2
Elliptic integrals of the second kind with complex arguments
s22aac 6 nag_specfun_legendre_p
Legendre and associated Legendre functions of the first kind with real arguments
s22bac 24 nag_specfun_hyperg_confl_real
Real confluent hypergeometric function ${}_{1}F_{1}\left(a;b;x\right)$
s22bbc 24 nag_specfun_hyperg_confl_real_scaled
Real confluent hypergeometric function ${}_{1}F_{1}\left(a;b;x\right)$ in scaled form
s22bec 24 nag_specfun_hyperg_gauss_real
Real Gauss hypergeometric function ${}_{2}F_{1}\left(a,b;c;x\right)$
s22bfc 24 nag_specfun_hyperg_gauss_real_scaled
Real Gauss hypergeometric function ${}_{2}F_{1}\left(a,b;c;x\right)$ in scaled form
s22cac 27 nag_specfun_mathieu_ang_periodic_real
Calculates values of real periodic angular Mathieu functions
s30aac 9 nag_specfun_opt_bsm_price
Black–Scholes–Merton option pricing formula
s30abc 9 nag_specfun_opt_bsm_greeks
Black–Scholes–Merton option pricing formula with Greeks
s30acc 27.1 nag_specfun_opt_imp_vol
Black–Scholes–Merton implied volatility
s30bac 9 nag_specfun_opt_lookback_fls_price
Floating-strike lookback option pricing formula in the Black-Scholes-Merton model
s30bbc 9 nag_specfun_opt_lookback_fls_greeks
Floating-strike lookback option pricing formula with Greeks in the Black-Scholes-Merton model
s30cac 9 nag_specfun_opt_binary_con_price
Binary option, cash-or-nothing pricing formula
s30cbc 9 nag_specfun_opt_binary_con_greeks
Binary option, cash-or-nothing pricing formula with Greeks
s30ccc 9 nag_specfun_opt_binary_aon_price
Binary option, asset-or-nothing pricing formula
s30cdc 9 nag_specfun_opt_binary_aon_greeks
Binary option, asset-or-nothing pricing formula with Greeks
s30fac 9 nag_specfun_opt_barrier_std_price
Standard barrier option pricing formula
s30jac 9 nag_specfun_opt_jumpdiff_merton_price
Jump-diffusion, Merton's model, option pricing formula
s30jbc 9 nag_specfun_opt_jumpdiff_merton_greeks
Jump-diffusion, Merton's model, option pricing formula with Greeks
s30nac 9 nag_specfun_opt_heston_price
Heston's model option pricing formula
s30nbc 23 nag_specfun_opt_heston_greeks
Heston's model option pricing formula with Greeks
s30ncc 24 nag_specfun_opt_heston_term
Heston's model option pricing with term structure
s30qcc 9 nag_specfun_opt_amer_bs_price
American option, Bjerksund and Stensland pricing formula
s30sac 9 nag_specfun_opt_asian_geom_price
Asian option, geometric continuous average rate pricing formula
s30sbc 9 nag_specfun_opt_asian_geom_greeks
Asian option, geometric continuous average rate pricing formula with Greeks