mixed precision confusion

Thomas M. Breuel uunet!idiap.ch!tmb
Fri Jun 12 19:24:50 PDT 1992


David G. Hough on validgh writes:
 > The STS-49 failure of the flight software to converge during targeting has been
 > traced to the Lambert targeting routine.  The associated algorithms used by the
 > routine converge on an independent variable called "U" which is a double
 > precision scalar.  U is iterated (up to 10 times) via this algorithm.  The
 > algorithm is designed to converge on a value of U between two dynamically
 > updated limits called U_MIN and U_MAX, which are single precision scalars.  On
 > each iteration, either U_MIN or U_MAX is updated to decrease the interval
 > within which the algorithm will search for the desired value of U.

This error could probably have been avoided if compilers simply
refused to perform automatic conversions between single precision and
double precision (and integers). Conversions between those types are
anything but trivial, and the programmer should be forced to be
explicit.

It's probably too late to fix this in C, C++, or FORTRAN, but I think
it is useful to keep this in mind for designing the numerical type
systems of future languages.

					Thomas.



More information about the Numeric-interest mailing list