** **

**West Coast
Grand Hotel**

**Seattle,
Washington**

**November 3,
2002**

** **

An open
meeting of the Java Numerics Working Group of the Java Grande Forum took place
at the ACM Java Grande/ISCOPE Conference held in November in Seattle. This
represents the minutes of this meeting.

Joe Darcy
provided an update of work going on at Sun of interest to the Working
Group. The following points were
covered.

- Version 1.4.1 is currently
shipping from Sun. Version 1.4.2,
which will include routine bug fixes and performance enhancements, is now
being prepared.
- Version 1.5 is currently
under active development, though its final set of features is as yet
undetermined. Among the items
being considered are the following.
- Augmenting java.lang.Math (and java.lang.StrictMath) to be on par with
the C math library (libm). See
Section II below.
- Adoption of JSR 13, which
provides better control over rounding precision in java.math.BigDecimal.
(This class provides methods for performing extended precision
decimal arithmetic.)
- Adoption of JSR 14,
generics. This proposal does not
include generics for primitive types, which is a severe limitation for
the numerics community. Registered Java Developer’s Connection (JDC)
members can get a prototype of the JSR14 generics compiler from http://developer.java.sun.com/developer/earlyAccess/adding_generics/
- Inclusion of static
imports. As the name implies, static import only imports
static methods (such as the methods in java.lang.Math). This is a namespace convenience, allowing
static method names from specifically designated imported packages to be
abbreviated, e.g. sin(x) rather
than Math.sin(x).
- Inclusion of facilities for
automatic boxing and unboxing of primitive types. This would allow primitives types to
be automatically promoted to objects for passing to methods, which
require objects. This might allow the extension of generics to
primitives. Some performance issues
must be resolved for this, however.
- Inclusion of enhanced for
loops (i.e., foreach), for programmer convenience.
- Inclusion of type-safe enums. The type-safe enum pattern is discussed in Josh
Bloch's book "Effective Java."

Joe
Darcy has proposed the inclusion of additional methods in java.lang.Math with the goal of making this library on par with the C math library
(libm). The following functions have
been proposed.

§ Inverse hyperbolic functions

§ IEEE 754 recommended functions

§ Fused multiply-add

The
Numerics Working Group endorsed this work, registering their support on the
Java Developer’s Connection web site.
Methods with the same name will also be included in java.lang.StrictMath. These will
be based on existing implementations from Sun’s fdlibm.

An
ad-hoc subcommittee will be formed to consider the addition of additional
functions in the Java math library. One
example is the reciprocal square root, which can be computed very quickly on
some processors.

Jose
Moreira provided an update on the progress of Java Specification Request (JSR)
83 on multiarrays. A multiarray is a
rectangular multidimensional array whose shape and extents are fixed. Such arrays admit compiler optimizations
that Java arrays of arrays do not. The
current plan is to develop a package of standard classes to provide
multiarrays. Support for 0 dimensional
arrays (scalars) through 7 dimensional arrays are planned. Multiarrays will be composable from all Java
primitive types. The expert group has
developed a proposed class hierarchy for multiarrays. A complete specification is expected in a few months. The expert group will provide the
implementation of the class, and the University of Manchester will develop
conformance tests.

Although
not planned as part of JSR-083, a preprocessor illustrating a proposed syntax
for multiarrays in Java will also be developed. The preprocessor will map the new syntax into method calls to the
multiarray package. This may provide
the basis for a future JSR to add multiarray syntax to the Java language
itself.

John
Brophy reported on the recently released JMSL library from Visual Numerics,
Inc. JMSL contains classes for
mathematics, statistics, financial computations, and charting. The math class contains methods for linear
algebra, interpolation, approximation, quadrature, ordinary differential
equations, transforms, nonlinear equations, optimization, and special
functions. The statistics class
contains methods for basic statistics, nonparametric tests, regression, ANOVA,
time series, goodness of fit tests, distribution functions, and random number
generation. While not as comprehensive
as the IMSL Fortran and C libraries, JMSL does provide a greater coverage of
mathematics and statistics than other math packages for Java. The web page for the library is
http://www.vni.com/jmsl/.

Members
of the working group re-affirmed their interest in having the following features
in Java.

- True multidimensional arrays indexed using specialized notation, e.g. A[I,j,k].
- Operator overloading to support the easy expression of alternate arithmetics.
- Complex numbers that are as efficient as primitive types.
- A new floating-point mode (i.e., fastfp) that admits the use of fused multiply-add operations in Java, and possibly admits additional compiler optimizations, such as the use of associativity.

Locating
champions to carry out the technical work of the group remains an issue.

Attendees
agreed that the work of the Working Group remained valuable and should
continue. It was suggested that more
frequent meetings of the working group (e.g., at six month intervals) would be
beneficial. A focused Java Grande workshop
on Java numerics issues is planned for 2003.

Ron Boisvert, NIST

John Brophy, Visual Numerics

Bryan Carpenter, Indiana University

Joe Darcy, Sun

Han-Ku Lee, Indiana University

Sang Lim, Indiana University

Mark Little, SAS Institute

Mikel Lujan, University of Manchester

Jose Moreira, IBM Research

Roldan Pozo, NIST

Keith Seymour, University of Tennessee

Jaime Spacco, University of Maryland