Issue 66, 11 October 2007

In this issue:

Top Story - NAG components aid the design of new magnetic materials

A Professor from The University of Oxford has created a software application designed to make the interpretation of neutron spectroscopy data easier which in turn aids the design of new magnetic materials.

The original impetus for the development of SPECTRE - the name given to the application created by Professor Boothroyd - came from the availability of new experimental probes for studying magnetism. Neutron spectroscopy, in particular, has become a very powerful probe of the magnetic state of atoms and the technique has made it possible to obtain accurate measurements of level splittings in atoms caused by interactions with the crystalline environment.

Armed with experimental data, Professor Boothroyd needed the analytical tools to work out the state of the electrons and so over the course of the research developed SPECTRE. Having used numerical algorithms from NAG in previous projects, Boothroyd turned to NAG once again to provide the mathematical functionality required by SPECTRE.

SPECTRE uses the most up-to-date atomic models, which makes the results very accurate and quantitative. In brief, SPECTRE calculates the neutron spectra in terms of a small number of unknown parameters, and determines these parameters by least-squares fitting to the data. The core of the calculation is a series of matrix diagonalizations carried out by NAG routines designed to handle Hermitian matrices. The least-squares fitting is also performed by NAG routines. The lowest energy eigenfunctions found by the program are used to calculate other experimentally accessible physical properties such as the magnetic susceptibility and specific heat capacity.

To read the entire article click here For information about Professor Boothroyd and his Group visit Questions about the NAG Library or SPECTRE can be directed to us at

Product News - Using the NAG Toolbox for MATLAB' - Part 3

The new NAG Toolbox for MATLAB' is still available for beta test by NAG Library users under Windows and Linux. The NAG Toolbox makes the full functionality of the NAG Library available through MATLAB, thereby enhancing the basic functionality that MATLAB has to offer in many areas. An advantage of calling NAG via MATLAB is that many routine arguments become optional or unnecessary, which makes code easier to read and maintain. Moreover, all of the NAG Library documentation has been converted to MATLAB help format, which makes it simple to access via MATLAB's usual documentation facilities.

The first beta release of the Toolbox appeared in February, and user feedback from its testing contributed to the development of a second beta, which came out in September. Users of the first beta are encouraged to upgrade to the second (via in order to take advantage of fixed bugs and other improvements.

Two earlier articles ( and discussed some of the contents of the NAG Toolbox, looking at special functions, surface fitting, function minimization (part 1), and root finding, curve fitting, interpolation and the use of a copula in modelling (part 2). In this third article, we continue our exploration of its contents, paying particular attention to time series analysis, quadrature, multivariate methods and random number generation. For the third article, go to

General Information - HECToR Service Availability - 16th October 2007

As reported in previous issues of NAGNews, NAG is directly involved in the UK's fastest supercomputer project, HECToR, providing computational science and engineering support to users. In the last issue of the newsletter we reported the first call for proposals to help users of HECToR port their codes to the system and improve the performance and functionality of the codes.

We are delighted to announce that service availability for HECToR will begin on 16th October 2007. Currently the service is only available to a small group of early adopters, but after the 16th October 2007 the power of HECToR will be available to the whole UK research community. In the next few months details of the scientific results being achieved on HECToR will start to appear on the HECToR website, and there will be regular updates in forthcoming editions of NAGNews.

To learn more about NAG's involvement with HECToR visit our website

Product Spotlight ' NAG Data Mining Components

Developed by NAG experts in 2001 specifically for the then emerging techniques of data mining and analysis, the NAG Data Mining Components or DMC for short, provide developers with robust, flexible and accurate numerical code. Comprising a set of precision algorithms required for mainstream data mining techniques, the DMC are simple to use and can shorten crucial development time.

DMC incorporates routines for data cleaning (including imputation and outlier detection), data transformations (scaling, principal component analysis), clustering, classification, regression models and machine learning methods (neural networks, radial basis function, decision trees, nearest neighbours), and association rules. Also included are utility functions including random number generators and functions for rank ordering, sorting, mean and sum of squares updates, two-way classification comparison, and save and load models.

For more information on the DMC or to download a trial version visit

Forthcoming Events - USA & UK
  • NAG QuantDay 2007 - Quantitative Modelling & Financial Market Dynamics
    New York, USA 31 October 2007

    NAG is delighted to be hosting a Quant Day in New York and London over the forthcoming months. The first of the series is to be held in the heart of New York's financial district on 31st October 2007.

    Distinguished speakers will present the following:

    Dynamic Portfolio Optimization using Decomposition and Finite-Element Methods - John Birge, Dean of The University of Chicago
    Multilevel Monte Carlo Path Simulation - Mike Giles, Professor of The University of Oxford's Computing Laboratory and Risk Magazine's Quant of the Year 2007
    Numerical Software, Market Data, and Extreme Events - Robert Tong, Technical Consultant, NAG Ltd

    This event will be held from 4.00pm - 8.00pm at the 7city Learning office just situated close to the American Stock Exchange. A technical Q&A pre-event from 2.30pm - 3.30pm and a cocktail reception from 8.00 - 9.30pm are also part of the program.

    There is no cost for this event, but seating is very limited so you are encouraged to register as soon as possible by completing the simple form

  • SC07 - International Conference for High Performance Computing
    Reno, USA, 10-16 November 2007

    NAG will be exhibiting at the world's largest event dedicated to high performance computing. NAG experts will be available to discuss NAG's numerical components tuned specifically for high performance computing. For more event information click here

  • Quant Congress Europe 2007
    London, UK, 14-16 November 2007

    In November, experts from NAG will be attending Quant Congress to highlight the benefits gained from using NAG's numerical components in finance industry applications and techniques. The conference features keynote speakers from the world of finance. For more information see the event website at

Tips & Hints - Windows Computing from Microsoft Office Suite

It is well known that the NAG DLL implementations provide an excellent source of algorithmic power to boost the functionality of the Microsoft Office suite. Previous articles have described how easy it is to use the libraries in this way. The DLL libraries are provided with examples of use within the Excel package and also the necessary interfacing software to VB and VBA.

Some users have asked why when they solve a problem within Excel using a NAG routine, slightly different answers are obtained when they repeat the same calculation immediately afterwards. The Intel chip can support 80-bit and 64-bit operation. The NAG libraries use the 64-bit operating mode because this is the default operation with the compilers used to form the DLLs. The first time a problem is solved this will be the mode of operation. The mode can be changed by setting the Floating Point Control Word and Excel does this to set the mode of working to 80-bit. In consequence the second time the problem is solved the NAG libraries will start the calculation in 80-bit mode.

For well-conditioned problems this is not serious and the NAG library routines will switch back to 64-bit working whenever it is essential for the correct working of an algorithm, but it can be disconcerting to see this behaviour. A solution is to set the Floating Point Control Word before each call to a NAG routine. At Mark 21 of the NAG Fortran Library and Mark 8 of the NAG C Library, this functionality is exposed from the DLLs via the pairs of routines X03AAW/X03AAX and x03aaw/x03aax respectively. More information is available via the Users' Note for each product.

For more information on NAG's DLLs click here or email us at with any specific questions.

All previous Tips & Hints can be found in the NAG Tips & Hints Repository at

Product News - Latest Implementations

NAG is committed to offering new implementations of its broad range of numerical and statistical software components and compilers and tools. The following implementations for NAG products have become available since the last issue of our newsletter:

The NAG C Library (, Mark 8 is now also available for the following platform:

  • IBM Power AIX 64-bit using the xlc Compiler, Double Precision

The NAG Data Mining Components, Release 2.0 is now also available for the following platform:

  • IBM Power AIX 64-bit using the xlc Compiler, Double Precision

For full details of these and all other available implementations, visit the NAG site. Comprehensive technical details of each implementation are given in the relevant Installation and User Notes at

Managing your subscription

Please feel free to forward this newsletter to colleagues or to post it to your company's Intranet sites.

To subscribe, unsubscribe or learn more about managing your subscription, please see: