# NAG FL InterfaceS (Specfun)Approximations of Special Functions

Settings help

FL Name Style:

FL Specification Language:

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

Routine
Mark of
Introduction

Purpose
s01baf 14 nagf_specfun_log_shifted
$\mathrm{ln}\left(1+x\right)$
s01eaf 14 nagf_specfun_exp_complex
Complex exponential, ${e}^{z}$
s07aaf 1 nagf_specfun_tan
$\mathrm{tan}x$
s09aaf 1 nagf_specfun_arcsin
$\mathrm{arcsin}x$
s09abf 3 nagf_specfun_arccos
$\mathrm{arccos}x$
s10aaf 3 nagf_specfun_tanh
$\mathrm{tanh}x$
s10abf 4 nagf_specfun_sinh
$\mathrm{sinh}x$
s10acf 4 nagf_specfun_cosh
$\mathrm{cosh}x$
s11aaf 4 nagf_specfun_arctanh
$\mathrm{arctanh}x$
s11abf 4 nagf_specfun_arcsinh
$\mathrm{arcsinh}x$
s11acf 4 nagf_specfun_arccosh
$\mathrm{arccosh}x$
s13aaf 1 nagf_specfun_integral_exp
Exponential integral ${E}_{1}\left(x\right)$
s13acf 2 nagf_specfun_integral_cos
Cosine integral $\mathrm{Ci}\left(x\right)$
Sine integral $\mathrm{Si}\left(x\right)$
s14aaf 1 nagf_specfun_gamma
Gamma function
s14abf 8 nagf_specfun_gamma_log_real
Log gamma function, real argument
s14acf 14 nagf_specfun_polygamma
$\psi \left(x\right)-\mathrm{ln}x$
Scaled derivatives of $\psi \left(x\right)$
s14aef 20 nagf_specfun_psi_deriv_real
Polygamma function ${\psi }^{\left(n\right)}\left(x\right)$ for real $x$
s14aff 20 nagf_specfun_psi_deriv_complex
Polygamma function ${\psi }^{\left(n\right)}\left(z\right)$ for complex $z$
s14agf 21 nagf_specfun_gamma_log_complex
Logarithm of the gamma function $\mathrm{ln}\Gamma \left(z\right)$, complex argument
s14ahf 23 nagf_specfun_gamma_log_scaled_real
Scaled log gamma function
s14anf 27 nagf_specfun_gamma_vector
Gamma function, vectorized $\Gamma \left(x\right)$
s14apf 27 nagf_specfun_gamma_log_real_vector
Log gamma function, vectorized $\mathrm{ln}\left(\Gamma \left(x\right)\right)$
s14baf 14 nagf_specfun_gamma_incomplete
Incomplete gamma functions $P\left(a,x\right)$ and $Q\left(a,x\right)$
s14bnf 27 nagf_specfun_gamma_incomplete_vector
Incomplete gamma functions, vectorized $P\left(a,x\right)$ and $Q\left(a,x\right)$
s14cbf 24 nagf_specfun_beta_log_real
Logarithm of the beta function $\mathrm{ln}B\left(a,b\right)$
s14ccf 24 nagf_specfun_beta_incomplete
Regularized incomplete beta function ${I}_{x}\left(a,b\right)$ and its complement $1-{I}_{x}$
s14cpf 27 nagf_specfun_beta_log_real_vector
Logarithm of the beta function, vectorized $\mathrm{ln}B\left(a,b\right)$
s14cqf 27 nagf_specfun_beta_incomplete_vector
Regularized incomplete beta function, vectorized ${I}_{x}\left(a,b\right)$ and its complement $1-{I}_{x}$
s15abf 3 nagf_specfun_cdf_normal
Cumulative Normal distribution function $P\left(x\right)$
s15acf 4 nagf_specfun_compcdf_normal
Complement of cumulative Normal distribution function $Q\left(x\right)$
Complement of error function $\mathrm{erfc}\left(x\right)$
s15aef 4 nagf_specfun_erf_real
Error function $\mathrm{erf}\left(x\right)$
s15aff 7 nagf_specfun_dawson
Dawson's integral
s15agf 22 nagf_specfun_erfcx_real
Scaled complement of error function, $\mathrm{erfcx}\left(x\right)$
s15apf 27 nagf_specfun_cdf_normal_vector
Cumulative Normal distribution function, vectorized $P\left(x\right)$
s15aqf 27 nagf_specfun_compcdf_normal_vector
Complement of cumulative Normal distribution function, vectorized $Q\left(x\right)$
s15arf 27 nagf_specfun_erfc_real_vector
Complement of error function, vectorized $\mathrm{erfc}\left(x\right)$
s15asf 27 nagf_specfun_erf_real_vector
Error function, vectorized $\mathrm{erf}\left(x\right)$
s15atf 27 nagf_specfun_dawson_vector
Dawson's integral, vectorized
s15auf 27 nagf_specfun_erfcx_real_vector
Scaled complement of error function, vectorized $\mathrm{erfcx}\left(x\right)$
s15ddf 14 nagf_specfun_erfc_complex
Scaled complex complement of error function, $\mathrm{exp}\left(-{z}^{2}\right)\mathrm{erfc}\left(-iz\right)$
s15drf 27 nagf_specfun_erfc_complex_vector
Scaled complex complement of error function, vectorized $\mathrm{exp}\left(-{z}^{2}\right)\mathrm{erfc}\left(-iz\right)$
s17acf 1 nagf_specfun_bessel_y0_real
Bessel function ${Y}_{0}\left(x\right)$
Bessel function ${Y}_{1}\left(x\right)$
s17aef 5 nagf_specfun_bessel_j0_real
Bessel function ${J}_{0}\left(x\right)$
s17aff 5 nagf_specfun_bessel_j1_real
Bessel function ${J}_{1}\left(x\right)$
s17agf 8 nagf_specfun_airy_ai_real
Airy function $\mathrm{Ai}\left(x\right)$
s17ahf 8 nagf_specfun_airy_bi_real
Airy function $\mathrm{Bi}\left(x\right)$
s17ajf 8 nagf_specfun_airy_ai_deriv
Airy function ${\mathrm{Ai}}^{\prime }\left(x\right)$
s17akf 8 nagf_specfun_airy_bi_deriv
Airy function ${\mathrm{Bi}}^{\prime }\left(x\right)$
s17alf 20 nagf_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)$
s17aqf 24 nagf_specfun_bessel_y0_real_vector
Bessel function vectorized ${Y}_{0}\left(x\right)$
s17arf 24 nagf_specfun_bessel_y1_real_vector
Bessel function vectorized ${Y}_{1}\left(x\right)$
s17asf 24 nagf_specfun_bessel_j0_real_vector
Bessel function vectorized ${J}_{0}\left(x\right)$
s17atf 24 nagf_specfun_bessel_j1_real_vector
Bessel function vectorized ${J}_{1}\left(x\right)$
s17auf 24 nagf_specfun_airy_ai_real_vector
Airy function vectorized $\mathrm{Ai}\left(x\right)$
s17avf 24 nagf_specfun_airy_bi_real_vector
Airy function vectorized $\mathrm{Bi}\left(x\right)$
s17awf 24 nagf_specfun_airy_ai_deriv_vector
Derivatives of the Airy function, vectorized ${\mathrm{Ai}}^{\prime }\left(x\right)$
s17axf 24 nagf_specfun_airy_bi_deriv_vector
Derivatives of the Airy function, vectorized ${\mathrm{Bi}}^{\prime }\left(x\right)$
s17dcf 13 nagf_specfun_bessel_y_complex
Bessel functions ${Y}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s17def 13 nagf_specfun_bessel_j_complex
Bessel functions ${J}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s17dgf 13 nagf_specfun_airy_ai_complex
Airy functions $\mathrm{Ai}\left(z\right)$ and ${\mathrm{Ai}}^{\prime }\left(z\right)$, complex $z$
s17dhf 13 nagf_specfun_airy_bi_complex
Airy functions $\mathrm{Bi}\left(z\right)$ and ${\mathrm{Bi}}^{\prime }\left(z\right)$, complex $z$
s17dlf 13 nagf_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$
s17gaf 26.1 nagf_specfun_struve_h0
Struve function of order $0$, ${H}_{0}\left(x\right)$
s17gbf 26.1 nagf_specfun_struve_h1
Struve function of order $1$, ${H}_{1}\left(x\right)$
s18acf 1 nagf_specfun_bessel_k0_real
Modified Bessel function ${K}_{0}\left(x\right)$
Modified Bessel function ${K}_{1}\left(x\right)$
s18aef 5 nagf_specfun_bessel_i0_real
Modified Bessel function ${I}_{0}\left(x\right)$
s18aff 5 nagf_specfun_bessel_i1_real
Modified Bessel function ${I}_{1}\left(x\right)$
s18aqf 24 nagf_specfun_bessel_k0_real_vector
Modified Bessel function vectorized ${K}_{0}\left(x\right)$
s18arf 24 nagf_specfun_bessel_k1_real_vector
Modified Bessel function vectorized ${K}_{1}\left(x\right)$
s18asf 24 nagf_specfun_bessel_i0_real_vector
Modified Bessel function vectorized ${I}_{0}\left(x\right)$
s18atf 24 nagf_specfun_bessel_i1_real_vector
Modified Bessel function vectorized ${I}_{1}\left(x\right)$
s18ccf 10 nagf_specfun_bessel_k0_scaled
Scaled modified Bessel function ${e}^{x}{K}_{0}\left(x\right)$
s18cdf 10 nagf_specfun_bessel_k1_scaled
Scaled modified Bessel function ${e}^{x}{K}_{1}\left(x\right)$
s18cef 10 nagf_specfun_bessel_i0_scaled
Scaled modified Bessel function ${e}^{-|x|}{I}_{0}\left(x\right)$
s18cff 10 nagf_specfun_bessel_i1_scaled
Scaled modified Bessel function ${e}^{-|x|}{I}_{1}\left(x\right)$
s18cqf 24 nagf_specfun_bessel_k0_scaled_vector
Scaled modified Bessel function vectorized ${e}^{x}{K}_{0}\left(x\right)$
s18crf 24 nagf_specfun_bessel_k1_scaled_vector
Scaled modified Bessel function vectorized ${e}^{x}{K}_{1}\left(x\right)$
s18csf 24 nagf_specfun_bessel_i0_scaled_vector
Scaled modified Bessel function vectorized ${e}^{-|x|}{I}_{0}\left(x\right)$
s18ctf 24 nagf_specfun_bessel_i1_scaled_vector
Scaled modified Bessel function vectorized ${e}^{-|x|}{I}_{1}\left(x\right)$
s18dcf 13 nagf_specfun_bessel_k_complex
Modified Bessel functions ${K}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s18def 13 nagf_specfun_bessel_i_complex
Modified Bessel functions ${I}_{\nu +a}\left(z\right)$, real $a\ge 0$, complex $z$, $\nu =0,1,2,\dots$
s18gaf 26.1 nagf_specfun_struve_l0
Modified Struve function of order $0$, ${L}_{0}\left(x\right)$
s18gbf 26.1 nagf_specfun_struve_l1
Modified Struve function of order $1$, ${L}_{1}\left(x\right)$
s18gcf 26.1 nagf_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
s18gdf 26.1 nagf_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
s18gkf 21 nagf_specfun_bessel_j_seq_complex
Bessel function of the 1st kind ${J}_{\alpha ±n}\left(z\right)$
s19aaf 11 nagf_specfun_kelvin_ber
Kelvin function $\mathrm{ber}x$
s19abf 11 nagf_specfun_kelvin_bei
Kelvin function $\mathrm{bei}x$
s19acf 11 nagf_specfun_kelvin_ker
Kelvin function $\mathrm{ker}x$
Kelvin function $\mathrm{kei}x$
s19anf 24 nagf_specfun_kelvin_ber_vector
Kelvin function vectorized $\mathrm{ber}x$
s19apf 24 nagf_specfun_kelvin_bei_vector
Kelvin function vectorized $\mathrm{bei}x$
s19aqf 24 nagf_specfun_kelvin_ker_vector
Kelvin function vectorized $\mathrm{ker}x$
s19arf 24 nagf_specfun_kelvin_kei_vector
Kelvin function vectorized $\mathrm{kei}x$
s20acf 5 nagf_specfun_fresnel_s
Fresnel integral $S\left(x\right)$
Fresnel integral $C\left(x\right)$
s20aqf 24 nagf_specfun_fresnel_s_vector
Fresnel integral vectorized $S\left(x\right)$
s20arf 24 nagf_specfun_fresnel_c_vector
Fresnel integral vectorized $C\left(x\right)$
s21baf 8 nagf_specfun_ellipint_symm_1_degen
Degenerate symmetrised elliptic integral of 1st kind ${R}_{C}\left(x,y\right)$
s21bbf 8 nagf_specfun_ellipint_symm_1
Symmetrised elliptic integral of 1st kind ${R}_{F}\left(x,y,z\right)$
s21bcf 8 nagf_specfun_ellipint_symm_2
Symmetrised elliptic integral of 2nd kind ${R}_{D}\left(x,y,z\right)$
s21bdf 8 nagf_specfun_ellipint_symm_3
Symmetrised elliptic integral of 3rd kind ${R}_{J}\left(x,y,z,r\right)$
s21bef 22 nagf_specfun_ellipint_legendre_1
Elliptic integral of 1st kind, Legendre form, $F\left(\varphi \mid m\right)$
s21bff 22 nagf_specfun_ellipint_legendre_2
Elliptic integral of 2nd kind, Legendre form, $E\left(\varphi \mid m\right)$
s21bgf 22 nagf_specfun_ellipint_legendre_3
Elliptic integral of 3rd kind, Legendre form, $\Pi \left(n;\varphi \mid m\right)$
s21bhf 22 nagf_specfun_ellipint_complete_1
Complete elliptic integral of 1st kind, Legendre form, $K\left(m\right)$
s21bjf 22 nagf_specfun_ellipint_complete_2
Complete elliptic integral of 2nd kind, Legendre form, $E\left(m\right)$
s21caf 15 nagf_specfun_jacellip_real
Jacobian elliptic functions sn, cn and dn of real argument
s21cbf 20 nagf_specfun_jacellip_complex
Jacobian elliptic functions sn, cn and dn of complex argument
s21ccf 20 nagf_specfun_jactheta_real
Jacobian theta functions ${\theta }_{k}\left(x,q\right)$ of real argument
s21daf 20 nagf_specfun_ellipint_general_2
General elliptic integral of 2nd kind $F\left(z,{k}^{\prime },a,b\right)$ of complex argument
s22aaf 20 nagf_specfun_legendre_p
Legendre functions of 1st kind ${P}_{n}^{m}\left(x\right)$ or $\overline{{P}_{n}^{m}}\left(x\right)$
s22baf 24 nagf_specfun_hyperg_confl_real
Real confluent hypergeometric function ${}_{1}F_{1}\left(a;b;x\right)$
s22bbf 24 nagf_specfun_hyperg_confl_real_scaled
Real confluent hypergeometric function ${}_{1}F_{1}\left(a;b;x\right)$ in scaled form
s22bef 25 nagf_specfun_hyperg_gauss_real
Real Gauss hypergeometric function ${}_{2}F_{1}\left(a,b;c;x\right)$
s22bff 25 nagf_specfun_hyperg_gauss_real_scaled
Real Gauss hypergeometric function ${}_{2}F_{1}\left(a,b;c;x\right)$ in scaled form
s22caf 27 nagf_specfun_mathieu_ang_periodic_real
Calculates values of real periodic angular Mathieu functions
s30aaf 22 nagf_specfun_opt_bsm_price
Black–Scholes–Merton option pricing formula
s30abf 22 nagf_specfun_opt_bsm_greeks
Black–Scholes–Merton option pricing formula with Greeks
s30acf 27.1 nagf_specfun_opt_imp_vol
Black–Scholes–Merton implied volatility
s30baf 22 nagf_specfun_opt_lookback_fls_price
Floating-strike lookback option pricing formula in the Black-Scholes-Merton model
s30bbf 22 nagf_specfun_opt_lookback_fls_greeks
Floating-strike lookback option pricing formula with Greeks in the Black-Scholes-Merton model
s30caf 22 nagf_specfun_opt_binary_con_price
Binary option, cash-or-nothing pricing formula
s30cbf 22 nagf_specfun_opt_binary_con_greeks
Binary option, cash-or-nothing pricing formula with Greeks
s30ccf 22 nagf_specfun_opt_binary_aon_price
Binary option, asset-or-nothing pricing formula
s30cdf 22 nagf_specfun_opt_binary_aon_greeks
Binary option, asset-or-nothing pricing formula with Greeks
s30faf 22 nagf_specfun_opt_barrier_std_price
Standard barrier option pricing formula
s30jaf 22 nagf_specfun_opt_jumpdiff_merton_price
Jump-diffusion, Merton's model, option pricing formula
s30jbf 22 nagf_specfun_opt_jumpdiff_merton_greeks
Jump-diffusion, Merton's model, option pricing formula with Greeks
s30naf 22 nagf_specfun_opt_heston_price
Heston's model option pricing formula
s30nbf 23 nagf_specfun_opt_heston_greeks
Heston's model option pricing formula with Greeks
s30ncf 25 nagf_specfun_opt_heston_term
Heston's model option pricing with term structure
s30qcf 22 nagf_specfun_opt_amer_bs_price
American option, Bjerksund and Stensland pricing formula
s30saf 22 nagf_specfun_opt_asian_geom_price
Asian option, geometric continuous average rate pricing formula
s30sbf 22 nagf_specfun_opt_asian_geom_greeks
Asian option, geometric continuous average rate pricing formula with Greeks