Updated 2002/04/02 |
Forte[tm] Developer 7: Interval Arithmetic Readme |
Contents
- Introduction
- About Forte Developer 7 Interval Arithmetic
- New and Changed Features
- Software Corrections
- Problems and Workarounds
- Limitations and Incompatibilities
- Documentation Errors
A. Introduction
This document contains information about Forte[tm] Developer 7 Interval Arithmetic. This document describes the new features and software corrections that are introduced in this release and lists known problems, limitations, and incompatibilities. Information in this document updates and extends information in the software manuals.
Information in the release notes updates and extends information in all readme files. To access the release notes and the complete Forte Developer documentation set, go to the documentation index at file:/opt/SUNWspro/docs/index.html.
To view the text version of this readme, type the following at a command prompt:
more /opt/SUNWspro/READMEs/interval_arithmetic
To view the HTML version of this readme, go to:
file:/opt/SUNWspro/docs/index.htmlNote - If your Forte Developer 7 software is not installed in the /opt directory, ask your system administrator for the equivalent path on your system.
B. About Forte Developer 7 Interval Arithmetic
This release of interval arithmetic is available on the Solaris[tm] operating environment (SPARC[tm] Platform Edition) versions 7, 8, and 9.
Support for intrinsic INTERVAL data types is a feature in the Forte Developer 7 Fortran 95 compiler. Two compiler flags, -xia and -xinterval, tell the compiler to recognize interval-specific language extensions and to generate executable interval code.
The Forte Developer 7 C++ compiler provides a C++ interface to the C++ interval arithmetic library. To use the C++ interval arithmetic features, add the #include <suninterval.h> header file to the code, and then compile the code using the -xia command-line option.
What Is Interval Arithmetic?
Interval arithmetic is used to evaluate arithmetic expressions over sets of numbers contained in intervals. An interval is the set of all real numbers between and including the lower and upper bound of the interval. Any interval arithmetic result is a new interval that is guaranteed to contain the set of all possible resulting values.
With Forte Developer 7 Fortran 95, it is a simple matter to write interval programs to compute rigorous bounds on the value of arithmetic expressions:
- Declare variables to be type INTERVAL.
- Write normal Fortran code including the intrinsic INTERVAL functions and operators, relational operators, and format edit descriptors.
- Compile the code using the -xia command-line option.
To achieve the best results, use existing interval algorithms that compute narrow-width interval results. Devising algorithms to compute narrow interval results is the topic of interval analysis. For information on interval algorithms, see "Where Can I Get More Information?".
Why Is Interval Arithmetic Important?
Interval arithmetic is important for the following reasons:
- Interval arithmetic can be used to perform machine computations with guaranteed bounds on errors from all sources, including input data errors, machine rounding errors, and their interactions.
- Interval algorithms can be used to solve nonlinear problems, such as the solution to nonlinear systems of equations and nonlinear programming (the nonlinear extension to linear programming).
As intervals become more widely used, libraries of interval solvers will be used routinely to compute sharp (narrow width) interval solutions to linear and nonlinear problems, while taking into account all sources of error. With these libraries, scientists, engineers, and developers of commercial applications will be able to write programs to solve problems that are currently beyond reach.
Where Can I Get More Information?
An introduction to interval arithmetic can be viewed at:
http://www.sun.com/forte/info/features/intervals.htmlFor information on the interval features added to Forte Developer 7 Fortran 95, see the Fortran 95 Interval Arithmetic Programming Reference available from http://docs.sun.com. For information on C++ interval arithmetic support, see the C++ Interval Arithmetic Programming Reference available from http://docs.sun.com.
Additional sources of interval information can be viewed at:
http://www.sun.com/forte/fortran/intervalor
http://www.sun.com/forte/cplusplus/intervalThese web sites contain links to the following information:
- A detailed bibliography
- An interval FAQ for Fortran 95 and C++
- Instructions for subscribing to an email list for discussing interval arithmetic topics
- Instructions for reporting a suspected interval error
- Information on interval code development
- Information on past cooperative research projects
C. New and Changed Features
This section describes the new and changed features for Forte Developer 7 Interval Arithmetic. For information about other Forte Developer components, see the What's New manual. To access this manual on your local system or network, go to file:/opt/SUNWspro/docs/index.html. You can also access this manual by going to http://docs.sun.com.
Interval BLAS Routines Added to Sun Performance Library[tm]
Interval BLAS routines, which operate on interval scalars, interval vectors, and interval matrices (dense, banded, symmetric, and triangular) have been added to the version of the Sun Performance Library[tm] provided with this release.
For information on Sun Performance Library and a list of the interval BLAS routines, see the Sun Performance Library readme. For information on using the interval BLAS routines, see the section 3p man pages provided with Sun Performance Library.
Reference information for the interval BLAS routines is also located in Appendix C of the Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard, located at http://www.netlib.org/blas/blast-forum/
Important: Information in the section 3p man pages supersedes information in Appendix C.
Users can access the interval BLAS routines in the library by doing one of the following:
a. Use the -xia flag at link time to link with all the necessary libraries. For example,
f95 -c -xia -dalign foo.f f95 -o foo -xia foo.o -lsuniperf
or
f95 -xia -dalign foo.f -lsuniperf
b. Use -xlic_lib=suniperf. For example,
f95 -c -xia -dalign foo.f f95 -o foo foo.o -xlic_lib=suniperfTwo New Template Classes Added to C++ Interval Arithmetic
A C++ interface to the C++ interval arithmetic library is extended with the nvector and nmatrix template classes that operate on interval vectors and interval matrices. To use these new features, add #include <suninterval_vector.h> or #include <suninterval_matrix.h> to the code. Because these classes are based on the C++ standard library, the classes are not available in compatibility mode (-compat).
Interval-Specific GPC Functions Added
The following interval specific checks are implemented in GPC:
- Issue a warning when using x*x, where x is INTERVAL. Sharper intervals are obtained when using x**2. Warning: potential sharpness loss use x**2 instead.
- Issue a warning when using x-x or x/x, where x is INTERVAL. Warning: potential sharpness loss.
- Issue an error when intervals are associated with other data types or intervals of different kind in a common block. Currently this is a warning.
D. Software Corrections
There is no new information at this time.
E. Problems and Workarounds
This section discusses known software problems and possible workarounds for those problems. For updates, check Forte Developer Hot Product News at http://www.sun.com/forte/fcc/hotnews.html.
Multi-Entry Interval Functions Can Return Incorrect Values (4652709)
Using f77 style multiple entry points can return incorrect values, as shown in the following code sample.
my_system% cat ff.f interval function FF(X) interval :: X entry GG(Y) RESULT(FF) interval :: Y FF=[1,2] end function interval function HH(X) interval :: X HH=[1,2] end function interval :: FF, GG, HH, x, y, z, w x = [0,1] y = FF(x) z = GG(x) w = HH(x) print *, "y = ", y print *, "z = ", z print *, "w = ", w end my_system% f95 -xia ff.f my_system% a.out y = [2.8732671817394566E-309,2.9760777586776157E-309] z = [6.6896488446904782E-319,4.2418854927292907E-314] w = [1.0,2.0]The invocations of the FF and GG functions give the wrong results. The HH function gives the correct results. Because incorrect values are returned, a silent containment failure can occur. Using f95 syntax produces correct results.
F. Limitations and Incompatibilities
This section discusses limitations and incompatibilities with systems or other software.
Interval Function Calls
In this release the interface (ABI) for interval function calls has changed so that Fortran functions returning intervals can be called from C++ programs. Because of this ABI change, Fortran functions and libraries containing interval functions are not binary compatible with previous Forte Developer compiler releases. Fortran and C++ programs and libraries with interval functions that were compiled with earlier Forte Developer compilers must be recompiled with the Forte Developer 7 f95 and CC compilers before Fortran functions returning intervals can be called from C++ programs.
Incompatiblity between -xia and -library=stlport4
You cannot use C++ interval math with the STLport C++ library. A program using the -xia option can be compiled and linked only as documented in the C++ Interval Arithmetic Programming Reference.
G. Documentation Errors
There is no new information at this time.
Copyright © 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.