[std-interval] C++ interval std

George Corliss George.Corliss at marquette.edu
Mon Apr 3 21:13:45 PDT 2006


FYI:

Wednesday, March 29, Sun Microsystems
Ned Nedialkov and I (George Corliss)  with quite a few Sun people.
Here is my visit report:


C++ compiler developers:
Steve Clamage <Stephen.Clamage at Sun.com>
Lawrence Crowl <Lawrence.Crowl at Sun.com>

Steve and Lawrence are both members of the C++ Committee (J16),
representing Sun. Steve is the chair of J16.  It was Lawrence
who wrote the comment to the this group in early March about
passing by value.

The discussion was quite wide ranging, but here are some points.

The standards committee is also considering user-defined literals.
If they adopt something there, we can probably use whatever is
adopted for our problems of literals in an interval context.

Sun has an open source release of its interval elementary functions,
so the barrier to entry is low.  That means we CAN require math.h
functions be provided in an interval standard.

Lawrence feels strongly that the standard should be to pass by
value.  Intervals are small data structures; by value allows them
to be passed in registers for speed.  That is how the current Sun
C++ compiler works.  There is no reason to follow the C++ complex
standard.  The library is often taken as an example by coders, and
there is no good reason to follow the tradition of C from 20 years
ago that structures should be passed by reference.

Infinities, etc.  Define mathematically what you must contain, and
permit as much implementation creativity as you can.

At this point, correctness is MUCH more important than speed.  When
people start demanding intervals be fast, we'll know we've won.
Having tests in each operation is not a problem.

Uninitialized.  The convention in C/C++ is to initialize to zero,
but we agree that is not correct for intervals.  Whole is probably
the best we can do.  Aside: The next day, we visited Berkeley and
talked with Jim Demmel and Bill Kahan.  Among other things, Kahan
wants user-defined data types to be tagged.  If we have the
Kahan-suggested tag, we can tag intervals as Uninitialized.

The 1999 C standard provides for access to IEEE hardware.  The
next version of the C++ standard will also address features new
in the 1999 C standard to be included in C++.

The current C++ standard does not discuss or acknowledge threads.
They are working on the next revision of the standard, which will
have something to say about threads in the language proper and in
the standard library.  Probably the interval standard should say,
"Intervals will be implemented in a thread-safe manner."

What it really takes to sell intervals to the standard committee
is evidence of users, together with broad agreement from the
domain experts.  I'll contact Siegfried to see what he knows about
numbers of users of his packages.  At some point, an open letter
to the standards committee with 100 signatures from the interval
community would help.

A freely available reference implementation is necessary.

Evidence of widespread teaching of intervals will help.



IEEE 754R
David Hough <David.Hough at Sun.com>

IEEE 754R is nearly over.  It is likely to include
   Decimal formats for floating point
       (Should C++ IA standard permit decimal intervals?)
   Quad precision
       (Should C++ IA standard quad intervals?)
   Fused Multiply and Add
       (I assume with directed rounding?
        Great for interval linear algebra, too)
   min/max
       (I wonder how they handle NaN, infinity, etc.)
   expression evaluation
       (Don't remember what that means)

As far as David is concerned, ISVs (Independent Software Vendors)
drive the market.

Dr. George F. Corliss
Electrical and Computer Engineering
Marquette University
PO Box 1881 
1515 W. Wisconsin Ave.
Milwaukee WI 53201-1881 USA
414-288-6599; Fax: 288-5579; Dept. 288-6280
Office: Haggerty Engineering 296
George.Corliss at Marquette.edu




More information about the Std-interval mailing list