Updated 2001/06/06 |

## Sun WorkShop[tm] 6 update 2 Interval Arithmetic Readme |

## Contents

- Introduction
- About Sun WorkShop 6 update 2 Interval Arithmetic
- New Features
- Software Corrections
- Problems and Workarounds
- Limitations and Incompatibilities
- Documentation Errata

## A. Introduction

This document contains last-minute information about this release of interval arithmetic. This document describes the software corrections addressed by this release and lists known problems, limitations, and incompatibilities.

For installation-related and late-breaking information about this release, see the

Sun WorkShop 6 update 2 Release Notes. Information in the release notes overrides information in all readme files.To access the release notes and the full Forte[tm] Developer/Sun WorkShop[tm] documentation set, point your Netscape[tm] Communicator 4.0 or compatible browser to the documentation index (

file:/opt/SUNWspro/docs/index.html).To view the text version of this readme, type the following at a command prompt:

example%more /opt/SUNWspro/READMEs/interval_arithmeticTo access the HTML version of this readme, point your Netscape Communicator 4.0 or compatible browser to:

file:/opt/SUNWspro/docs/index.html

Note -If your Sun WorkShop software is not installed in the/optdirectory, ask your system administrator for the equivalent path on your system.

## B. About Sun WorkShop 6 update 2 Interval Arithmetic

This release of interval arithmetic runs on SPARC[tm] processors running Solaris[tm] SPARC Platform Edition versions 2.6, 7 and 8, and is a second update to the Sun WorkShop 6 release.

Support for intrinsic

INTERVALdata types is a feature in the Sun WorkShop 6 Fortran 95 compiler. Two new compiler flags,-xiaand-xinterval, tell the compiler to recognize interval-specific language extensions and to generate executable interval code.The Sun WorkShop 6 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-xiacommand-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 Sun WorkShop 6 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
INTERVALfunctions and operators, relational operators, and format edit descriptors.- Compile the code using the
-xiacommand-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 Fortran 95, see the

Interval Arithmetic Programming Referenceavailable from http://docs.sun.com in the Forte for High Performance Computing 6 update 2/ Sun WorkShop 6 update 2 Compilers for Fortran 77/95 Collection. For information on C++ interval arithmetic support, see theC++ Interval Arithmetic Programming Referenceavailable from http://docs.sun.com in the Forte Developer 6 update 2/Sun WorkShop 6 update 2 Collection.Additional sources of interval information can be viewed at:

These web sites contain links to the following information:http://www.sun.com/forte/fortran/intervalor

http://www.sun.com/forte/cplusplus/interval

- 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 Features

## New Features

This section describes the new and changed features for Sun WorkShop 6 update 2 Interval Arithmetic.

There are no new features in this release. This release does include the bug fix listed in Software Corrections.

## Features in the Sun WorkShop 6 update 1 Release

The Sun WorkShop 6 update 1 release of interval arithmetic introduced the following features:

C++ SupportSun WorkShop 6 update 1 Compilers C++ (5.2) provides a C++ interface to the C++ interval arithmetic library. For more information, see the

C++ Interval Arithmetic Programming Referenceavailable fromhttp://docs.sun.com(in the Forte Developer 6 update 1/Sun WorkShop 6 update 1 Collection) or

http://www.sun.com/forte/cplusplus/intervalFor information about related compiler options, see the following entries in the

CC(1) man page:

-xia-library=[no%]intervalThe C++ interval arithmetic library is compatible with interval arithmetic as implemented in the Fortran compiler.

To use the C++ interval arithmetic features, add the following header file to the code.

#include <suninterval.h>An example of compiling code using the

-xiacommand-line option is shown here.

example%CC -ofilename-xiafilename.cc

Dependent Subtraction Operator Added to Fortran 95 Interval ArithmeticThe dependent subtraction operator

.DSUB.can be used to recover either operand of a previous interval addition.Two interval variables are dependent when one interval variable is a result of an interval arithmetic operation applied to the other interval variable. For example, if

X = A + B, thenXdepends on bothAandB. Dependent interval subtraction produces narrower interval results when recoveringAorBfromX.Dependent operations cannot be applied to interval constants because constants are independent. Applying dependent operations to interval constants produces a compile-time error.

The result of

X.DSUB.Acontains the solution forBof the interval equationX = A + B. The result is[-inf,inf]if there is no solution.

Random Number Subroutine Added to Fortran 95 Interval Arithmetic

RANDOM_NUMBER(HARVEST)returns through the interval variableHARVESTone pseudorandom interval [a, b], or an array of pseudorandom intervals from uniform distributions over the ranges 0 <= a <= 1, and a <= b <= 1.

Division With Intersection Function Added to Fortran 95 Interval ArithmeticThe function

DIVIXreturns the interval enclosure of the result of the interval division operation (A/B) intersected with the interval C.In the case when A contains zero, the mathematical result of the interval division operation (A/B) is the union of two disjoint intervals. Each interval in the union can be represented in the currently implemented interval arithmetic system. The

DIVIXfunction is a convenient way to compute one or both of these intervals.

## D. Software Corrections

## Compilation Time With

-xiaOption (Interval Arithmetic) on V9 PlatformsThe following bug has been corrected in this release of interval arithmetic.

A bug in peephole optimization (4361621) has been fixed so that compiling with the combined options

-xia -04 -xarch=v9orv9bno longer takes an excessive amount of time. It is no longer necessary to compile code with an optimization level lower than-04or limit the use of-xiato only those program units that actually contain interval arithmetic syntax in the source.## Using

-xiaand-xintervalWith-fsimpleor-fnsCommand-Line OptionsThe following bug was reported in the Sun WorkShop 6 version of interval arithmetic.

-xinterval={widestneed|strict}and-xia={widestneed|strict}command line options cannot be used with either-fsimpleor-fnsoptions set to any value other than-fsimple=0and-fns=no.This restriction is not always enforced when the

-xiaoption is used in combination with other options (for example-fast) that can set either-fsimpleor-fns. For this reason, specify the-xiaoption last on the command line.The Sun WorkShop 6 update 1 version of interval arithmetic was changed so that the following applies.

When using the

-xia={widestneed|strict}or-xinterval={widestneed|strict}command line option with the-fsimpleand-fnsoptions set to any values other than-fsimple=0and-fns=no, make sure that-xiaor-xintervaloccurs after-fsimpleor-fnson the command line.

-xiaexpands into-fsimple=0 -fns=no, which suppresses any previous values for-fsimpleand-fns. After setting-xinterval, an error occurs if-fsimpleis set to a value other than0or-fnsis set to a value other thanno.

## E. Problems and Workarounds

This section discusses software bugs that could not be fixed in time for this release. (For updates, check Forte Developer Hot Product News,

)http://www.sun.com/forte/developer/hotnews.htmlThere is no new information at this time.

## F. Limitations and Incompatibilities

There is no new information at this time.

## G. Documentation Errata

The

interval-specific functionis_emptyis incorrectly listed in theC++ Interval Arithmetic Programming Referenceasisempty. The correct name of theinterval-specific function isis_empty.

Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303, U.S.A. All rights reserved.

Sun, Sun Microsystems, the Sun logo, docs.sun.com, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries.