Lines Matching +full:conversion +full:- +full:interval

1 .\" Copyright (C) Caldera International Inc. 2001-2002.  All rights reserved.
43 does floating point interval arithmetic.
45 constants, the arithmetic operations +, \-, *, /,
46 unary \-, and = (assignment), and has 26 floating
58 There are 26 interval valued variables ``A'' through ``Z''
62 the (floating or interval) value.
69 This structure is given a type name, INTERVAL, by using
79 division by an interval containing 0, and an interval presented in
86 keep track of the type (e.g. scalar or interval) of intermediate
88 Note that a scalar can be automatically promoted to an interval if
89 the context demands an interval value.
94 2.5 + ( 3.5 \- 4. )
100 Notice that the 2.5 is to be used in an interval valued expression
105 tokens to decide whether to convert a scalar to an interval.
106 This problem is evaded by having two rules for each binary interval
108 the left operand is an interval.
109 In the second case, the right operand must be an interval,
110 so the conversion will be applied automatically.
112 conversion may be applied or not, leading to the above
133 is used to do the actual conversion from a character string
146 typedef struct interval {
148 } INTERVAL;
150 INTERVAL vmul(), vdiv();
155 INTERVAL vreg[ 26 ];
173 %type <vval> vexp /* interval expression */
177 %left \'+\' \'\-\'
204 | dexp \'\-\' dexp
205 { $$ = $1 \- $3; }
210 | \'\-\' dexp %prec UMINUS
211 { $$ = \- $2; }
223 printf( "interval out of order\en" );
235 | vexp \'\-\' vexp
236 { $$.hi = $1.hi \- $3.lo;
237 $$.lo = $1.lo \- $3.hi; }
238 | dexp \'\-\' vexp
239 { $$.hi = $1 \- $3.lo;
240 $$.lo = $1 \- $3.hi; }
251 | \'\-\' vexp %prec UMINUS
252 { $$.hi = \-$2.lo; $$.lo = \-$2.hi; }
269 yylval.ival = c \- \'A\';
273 yylval.ival = c \- \'a\';
283 for( ; (cp\-buf)<BSZ ; ++cp,c=getchar() ){
301 if( (cp\-buf) >= BSZ ) printf( "constant too long: truncated\en" );
309 INTERVAL hilo( a, b, c, d ) double a, b, c, d; {
310 /* returns the smallest interval containing a, b, c, and d */
328 INTERVAL vmul( a, b, v ) double a, b; INTERVAL v; {
332 dcheck( v ) INTERVAL v; {
334 printf( "divisor interval contains 0.\en" );
340 INTERVAL vdiv( a, b, v ) double a, b; INTERVAL v; {