Mark 22 NAG Fortran Library News (PDF version)
NAG Library Manual

NAG Library

Mark 22 NAG Fortran Library News

+ Contents

1  Introduction

At Mark 22 of the NAG Library new functionality has been introduced in addition to improvements in existing areas. The Library now contains 1617 user-callable routines, all of which are documented, of which 129 are new at this mark.
Three new chapters have been introduced on wavelet transforms global optimization, and further linear algebra support routines; a new sub-chapter has also been introduced on option pricing formulae; and extensions have been included in the areas of statistics, optimization, linear algebra, ordinary differential equations, regression, random numbers, searching, and special functions.
The new Chapter C09 (Wavelet Transforms) has routines for performing one-dimensional discrete, single-level and multi-level, wavelet transforms and their inverses.
The new Chapter E05 (Global Optimization of a Function) has a routine for performing global optimization on a problem with simple bounds using a multi-level coordinate search, which is complemented by a number of support routines for initializing the data and setting optional parameters.
The new Chapter F16 (Further Linear Algebra Support Routines) contains various useful level-1 routines from the BLAS Technical Forum (BLAST).
Chapter C05 (Roots of One or More Transcendental Equations) has a new routine to evaluate real values of Lambert's W function.
Chapter D02 (Ordinary Differential Equations) has extended its functionality to include routines that use the integration method of DASSL; thus, implicit differential algebraic equations of index 2 can now be solved.
Chapter E04 (Minimizing or Maximizing a Function) has added a replacement routine for applying the simplex algorithm which should perform significantly faster than the original.
Chapter F01 (Matrix Operations, Including Inversion) contains a new routine for computing the matrix exponential of a real-valued matrix.
Chapter F02 (Eigenvalues and Eigenvectors) contains a new routine for obtaining leading terms in the singular value decomposition of a real general matrix.
Chapter F07 (Linear Equations (LAPACK)) contains two new routines for solving systems of linear equations using mixed single and double precision arithmetic. For well conditioned problems, these can produce results accurate to double precision while taking advantage of the higher performance of single precision routines on many computer architectures.
Chapter G01 (Simple Calculations on Statistical Data) contains a new routine for finding quantiles of an unordered vector.
Chapter G02 (Correlation and Regression Analysis) contains new routines for: computing the nearest correlation matrix to a real square matrix; computing predicted value and error from a generalized linear model; ridge regression; and partial least squares.
Chapter G03 (Multivariate Methods) contains a new routine for performing ProMax rotations.
Chapter G05 (Random Number Generators) has been overhauled to provide a consistent set of routines for: initializing pseudorandom, quasirandom and scrambled quasirandom base generators; generating vectors from distributions; generating matrices from Copula and multivariate distributions; and generating realizations from (V)ARMA models and GARCH processes. The base generators now include the Mersenne Twister and ACORN generators.
Chapter G13 (Time Series Analysis) contains new routines for exponential smoothing of a univariate time series, and fitting a VARMA model to a multivariate time series.
Chapter M01 (Sorting and Searching) is renamed from ‘Sorting’ and contains routines for searching arrays of real-valued, integer or character data.
Chapter S (Approximations of Special Functions) now includes a suite of routines for evaluating various option pricing formulae. This chapter also contains new routines for computing the scaled complement of the error function (erfcx), a scaled gamma function and computing elliptic integrals in the classical Legendre form.
Plots of example program results have been added to many routine documents. In some cases the example program has been modified slightly to produce a larger set of results giving a more representative plot of the solution profile produced.

2  New Routines

The 129 new user-callable routines included in the NAG Library at Mark 22 are as follows.
Routine
Name

Purpose
A00ADF Library identification, details of implementation, major and minor marks
C05BAF Real values of Lambert's W function, W(x)
C09AAF Wavelet filter initialization
C09CAF one-dimensional discrete wavelet transform
C09CBF one-dimensional inverse discrete wavelet transform
C09CCF one-dimensional multi-level discrete wavelet transform
C09CDF one-dimensional inverse multi-level discrete wavelet transform
D02MCF Implicit ordinary differential equations/DAEs, initial value problem, DASSL method continuation for D02NEF
D02MWF Implicit ordinary differential equations/DAEs, initial value problem, setup for D02NEF
D02NEF Implicit ordinary differential equations/DAEs, initial value problem, DASSL method integrator
D02NPF Implicit ordinary differential equations/DAEs, initial value problem linear algebra setup routine for D02NEF
E04CBF Unconstrained minimization using simplex algorithm, function of several variables using function values only
E05JAF Initialization routine for E05JBF
E05JBF Global optimization by multi-level coordinate search, simple bounds, using function values only
E05JCF Supply optional parameter values for E05JBF from external file
E05JDF Set a single optional parameter for E05JBF from a character string
E05JEF Set a single optional parameter for E05JBF from an ‘ON’/‘OFF’-valued character argument
E05JFF Set a single optional parameter for E05JBF from an integer argument
E05JGF Set a single optional parameter for E05JBF from a real argument
E05JHF Determine whether an optional parameter for E05JBF has been set by you or not
E05JJF Get the setting of an ‘ON’/‘OFF’-valued character optional parameter of E05JBF
E05JKF Get the setting of an Integer valued optional parameter of E05JBF
E05JLF Get the setting of a real valued optional parameter of E05JBF
F01ECF Real matrix exponential
F02WGF Computes leading terms in the singular value decomposition of a real general matrix; also computes corresponding left and right singular vectors
F07ACF Mixed precision real system solver
F07AQF Mixed precision complex system solver
F16DLF Sum elements of integer vector
F16DNF Maximum value and location, integer vector
F16DPF Minimum value and location, integer vector
F16DQF Maximum absolute value and location, integer vector
F16DRF Minimum absolute value and location, integer vector
F16EHF Real scaled vector addition preserving input
F16ELF Sum elements of real vector
F16GHF Complex scaled vector addition preserving input
F16GLF Sum elements of complex vector
F16JNF Maximum value and location, real vector
F16JPF Minimum value and location, real vector
F16JQF Maximum absolute value and location, real vector
F16JRF Minimum absolute value and location, real vector
F16JSF Maximum absolute value and location, complex vector
F16JTF Minimum absolute value and location, complex vector
G01AMF Find quantiles of an unordered vector, real numbers
G02AAF Computes the nearest correlation matrix to a real square matrix, using the method of Qi and Sun
G02GPF Computes a predicted value and its associated standard error based on a previously fitted generalized linear model.
G02KAF Ridge regression, optimizing a ridge regression parameter
G02KBF Ridge regression using a number of supplied ridge regression parameters
G02LAF Partial least-squares (PLS) regression using singular value decomposition
G02LBF Partial least-squares (PLS) regression using Wold's iterative method
G02LCF PLS parameter estimates following partial least-squares regression by G02LAF or G02LBF
G02LDF PLS predictions based on parameter estimates from G02LCF
G03BDF ProMax rotations
G05KFF Initializes a pseudorandom number generator to give a repeatable sequence
G05KGF Initializes a pseudorandom number generator to give a non-repeatable sequence
G05KHF Primes a pseudorandom number generator for generating multiple streams using leap-frog
G05KJF Primes a pseudorandom number generator for generating multiple streams using skip-ahead
G05NCF Pseudorandom permutation of an integer vector
G05NDF Pseudorandom sample from an integer vector
G05PDF Generates a realization of a time series from a GARCH process with asymmetry of the form (εt - 1 + γ)2
G05PEF Generates a realization of a time series from a GARCH process with asymmetry of the form (|εt - 1| + γεt - 1)2
G05PFF Generates a realization of a time series from an asymmetric Glosten, Jagannathan and Runkle (GJR) GARCH process
G05PGF Generates a realization of a time series from an exponential GARCH (EGARCH) process
G05PHF Generates a realization of a time series from an ARMA model
G05PJF Generates a realization of a multivariate time series from a VARMA model
G05PMF Generates a realization of a time series from an exponential smoothing model
G05PXF Generates a random orthogonal matrix
G05PYF Generates a random correlation matrix
G05PZF Generates a random two-way table
G05RCF Generates a matrix of pseudorandom numbers from a Student's t-copula
G05RDF Generates a matrix of pseudorandom numbers from a Gaussian copula
G05RYF Generates a matrix of pseudorandom numbers from a multivariate Student's t-distribution
G05RZF Generates a matrix of pseudorandom numbers from a multivariate Normal distribution
G05SAF Generates a vector of pseudorandom numbers from a uniform distribution over (0,1]
G05SBF Generates a vector of pseudorandom numbers from a beta distribution
G05SCF Generates a vector of pseudorandom numbers from a Cauchy distribution
G05SDF Generates a vector of pseudorandom numbers from a χ2 distribution
G05SEF Generates a vector of pseudorandom numbers from a Dirichlet distribution
G05SFF Generates a vector of pseudorandom numbers from an exponential distribution
G05SGF Generates a vector of pseudorandom numbers from an exponential mix distribution
G05SHF Generates a vector of pseudorandom numbers from an F-distribution
G05SJF Generates a vector of pseudorandom numbers from a gamma distribution
G05SKF Generates a vector of pseudorandom numbers from a Normal distribution
G05SLF Generates a vector of pseudorandom numbers from a logistic distribution
G05SMF Generates a vector of pseudorandom numbers from a log-normal distribution
G05SNF Generates a vector of pseudorandom numbers from a Student's t-distribution
G05SPF Generates a vector of pseudorandom numbers from a triangular distribution
G05SQF Generates a vector of pseudorandom numbers from a uniform distribution over [a,b]
G05SRF Generates a vector of pseudorandom numbers from a von Mises distribution
G05SSF Generates a vector of pseudorandom numbers from a Weibull distribution
G05TAF Generates a vector of pseudorandom integers from a binomial distribution
G05TBF Generates a vector of pseudorandom logical values
G05TCF Generates a vector of pseudorandom integers from a geometric distribution
G05TDF Generates a vector of pseudorandom integers from a general discrete distribution
G05TEF Generates a vector of pseudorandom integers from a hypergeometric distribution
G05TFF Generates a vector of pseudorandom integers from a logarithmic distribution
G05TGF Generates a vector of pseudorandom integers from a multinomial distribution
G05THF Generates a vector of pseudorandom integers from a negative binomial distribution
G05TJF Generates a vector of pseudorandom integers from a Poisson distribution
G05TKF Generates a vector of pseudorandom integers from a Poisson distribution with varying mean
G05TLF Generates a vector of pseudorandom integers from a uniform distribution
G05YLF Initializes a quasi-random number generator
G05YMF Generates a uniform quasi-random number sequence
G05YNF Initializes a scrambled quasi-random number generator
G13AMF Univariate time series, exponential smoothing
G13DDF Multivariate time series, estimation of VARMA model
M01NAF Binary search in set of real numbers
M01NBF Binary search in set of integer numbers
M01NCF Binary search in set of character data
S15AGF Scaled complement of error function, erfcx(x)
S21BEF Elliptic integral of 1st kind, Legendre form, F(φ|m)
S21BFF Elliptic integral of 2nd kind, Legendre form, E(φ|m)
S21BGF Elliptic integral of 3rd kind, Legendre form, Π(n ; φ|m)
S21BHF Complete elliptic integral of 1st kind, Legendre form, K(m)
S21BJF Complete elliptic integral of 2nd kind, Legendre form, E(m)
S30AAF Black–Scholes–Merton option pricing formula
S30ABF Black–Scholes–Merton option pricing formula with Greeks
S30BAF Floating-strike lookback option pricing formula
S30BBF Floating-strike lookback option pricing formula with Greeks
S30CAF Binary option: cash-or-nothing pricing formula
S30CBF Binary option: cash-or-nothing pricing formula with Greeks
S30CCF Binary option: asset-or-nothing pricing formula
S30CDF Binary option: asset-or-nothing pricing formula with Greeks
S30FAF Standard barrier option pricing formula
S30JAF Jump-diffusion, Merton's model, option pricing formula
S30JBF Jump-diffusion, Merton's model, option pricing formula with Greeks
S30NAF Heston's model option pricing formula
S30QCF American option: Bjerksund and Stensland pricing formula
S30SAF Asian option: geometric continuous average rate pricing formula
S30SBF Asian option: geometric continuous average rate pricing formula with Greeks

3  Withdrawn Routines

The following routines have been withdrawn from the NAG Library at Mark 22. Warning of their withdrawal was included in the NAG Library Manual at Mark 21, together with advice on which routines to use instead. See the document ‘Advice on Replacement Calls for Withdrawn/Superseded Routines’ for more detailed guidance.
Withdrawn
Routine

Replacement Routine(s)
E04UNF E04USF/E04USA
F11GAF F11GDF
F11GBF F11GEF
F11GCF F11GFF
G05CAF G05SAF
G05CBF G05KFF
G05CCF G05KGF
G05CFF F06DFF
G05CGF F06DFF
G05DAF G05SQF
G05DBF G05SFF
G05DCF G05SLF
G05DDF G05SKF
G05DEF G05SMF
G05DFF G05SCF
G05DHF G05SDF
G05DJF G05SNF
G05DKF G05SHF
G05DPF G05SSF
G05DRF G05TKF
G05DYF G05TLF
G05DZF G05TBF
G05EAF G05RZF
G05EBF G05TLF
G05ECF G05TJF
G05EDF G05TAF
G05EEF G05THF
G05EFF G05TEF
G05EGF G05PHF
G05EHF G05NCF
G05EJF G05NDF
G05EWF G05PHF
G05EXF G05TDF
G05EYF G05TDF
G05EZF G05RZF
G05FAF G05SQF
G05FBF G05SFF
G05FDF G05SKF
G05FEF G05SBF
G05FFF G05SJF
G05FSF G05SRF
G05GAF G05PXF
G05GBF G05PYF
G05HDF G05PJF
G05ZAF No replacement routine required

4  Routines Scheduled for Withdrawal

The routines listed below are scheduled for withdrawal from the NAG Library, because improved routines have now been included in the Library. You are advised to stop using routines which are scheduled for withdrawal and to use recommended replacement routines instead. See the document ‘Advice on Replacement Calls for Withdrawn/Superseded Routines’ for more detailed guidance, including advice on how to change a call to the old routine into a call to its recommended replacement.
The following routines will be withdrawn at Mark 23.
Routines Scheduled
for Withdrawal

Replacement Routine(s)
F02BJF F08WAF (DGGEV)
F02EAF F08PAF (DGEES)
F02EBF F08NAF (DGEEV)
F02FAF F08FAF (DSYEV)
F02FCF F08FBF (DSYEVX)
F02FDF F08SAF (DSYGV)
F02FHF F08UAF (DSBGV)
F02GAF F08PNF (ZGEES)
F02GBF F08NNF (ZGEEV)
F02GJF F08WNF (ZGGEV)
F02HAF F08FNF (ZHEEV)
F02HCF F08FPF (ZHEEVX)
F02HDF F08SNF (ZHEGV)
F02WEF F08KBF (DGESVD)
F02XEF F08KPF (ZGESVD)
F04AAF F07AAF (DGESV)
F04ACF F07HAF (DPBSV)
F04ADF F07ANF (ZGESV)
F04ARF F07AAF (DGESV)
F04EAF F07CAF (DGTSV)
F04FAF F07JAF (DPTSV), F07JDF (DPTTRF) and F07JEF (DPTTRS)
F04JAF F08KAF (DGELSS)
F04JDF F08KAF (DGELSS)
F04JLF F08ZBF (DGGGLM)
F04JMF F08ZAF (DGGLSE)
F04KLF F08ZPF (ZGGGLM)
F04KMF F08ZNF (ZGGLSE)
G05YAF G05YLF and G05YMF
G05YBF G05YLF and either G05YJF or G05YKF
The following routines have been superseded, but will not be withdrawn from the Library until Mark 24 at the earliest.
Superseded
Routine

Replacement Routine(s)
E04CCF E04CBF
G05HKF G05PDF
G05HLF G05PEF
G05HMF G05PFF
G05HNF G05PGF
G05KAF G05SAF
G05KBF G05KFF
G05KCF G05KGF
G05KEF G05TBF
G05LAF G05SKF
G05LBF G05SNF
G05LCF G05SDF
G05LDF G05SHF
G05LEF G05SBF
G05LFF G05SJF
G05LGF G05SQF
G05LHF G05SPF
G05LJF G05SFF
G05LKF G05SMF
G05LLF G05SJF
G05LMF G05SSF
G05LNF G05SLF
G05LPF G05SRF
G05LQF G05SGF
G05LXF G05RYF
G05LYF G05RZF
G05LZF G05RZF
G05MAF G05TLF
G05MBF G05TCF
G05MCF G05THF
G05MDF G05TFF
G05MEF G05TKF
G05MJF G05TAF
G05MKF G05TJF
G05MLF G05TEF
G05MRF G05TGF
G05MZF G05TDF
G05NAF G05NCF
G05NBF G05NDF
G05PAF G05PHF
G05PCF G05PJF
G05QAF G05PXF
G05QBF G05PYF
G05QDF G05PZF
G05RAF G05RDF
G05RBF G05RCF
G05YCF G05YLF
G05YDF G05YMF
G05YEF G05YLF
G05YFF G05YMF
G05YGF G05YLF
G05YHF G05YMF
G13DCF G13DDF
P01ABF No longer required
X02DAF No longer required
X02DJF No longer required

Mark 22 NAG Fortran Library News (PDF version)
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009