Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

RE: A Level 2 query - X-X



This may be not OK, if we have two different values X and Y for which it so happens that their bounds coincide, so instead of saying Y = [5.0,10.0], a programmer may want to save time and write Y  = X, but these are still different quantities about which we cannot assume that the actual values are equal

 

I think it is safe to optimize X-X to 0, but NOT the other two examples

 

From: stds-1788@xxxxxxxx [mailto:stds-1788@xxxxxxxx] On Behalf Of Ian McIntosh
Sent: Wednesday, July 03, 2013 12:19 PM
To: stds-1788@xxxxxxxxxxxxxxxxx
Subject: Re: A Level 2 query - X-X

 

For intervals it would be OK to do the same for
SUB = X - X;
(except for infinite bounds) because X is identical to X, and for
X = [5., 10.];
Y = X;
Z = X - Y;
because the value Y represents is identical to X and none of the bounds is infinite, and for
U = [5., 10.];
X = U;
Y = U;
Z = X - Y;
because X and Y are always identical,