X3J3/96-175 Page 1 of 1 Date: November 13, 1996 To: X3J3 From: R. Baker Kearfott Subject: Choices for Interval Mixed Mode The discussion group (producers of X3J3/ 96-156) decided that constants should be handled differently from variables in mixed mode expressions, for the following reasons. 1. It is natural in certain contexts to put non-interval constants into expressions. For example, one may write F = X**2 + 3 X + 0.1 2. Many constants, such as 3, 0.25, are representable exactly on most processors, while others are not. 3. It is generally known what the user expects when a constant such as 0.1 is written, whereas, if a non-interval variable such as R appears in an expression, it is unknown how it has arisen, or how accurately it represents a user-intended "true" value. These considerations, along with subsequent discussion at X3J3, have led to the following modification of 96-156. =================================================================== Whenever a constant or variable is converted to interval, it is converted to an interval [A,B] that contains the exact value represented by the constant or variable. When the conversion occurs shall be consistent with general rules for mixed mode expressions. (Note: I have removed the requirement in 96-156 that constants be converted as if they were first converted to interval, with no intervening conversion to other floating point values.) =================================================================== In any case, language to users stating that, in general, mixed mode arithmetic is to be avoided, is advisable. (Users can avoid mixed mode arithmetic with interval constructors or with the function IVAL.) The reason is that mixed mode arithmetic may not always give users the expected enclosures.