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

Re: A Level 2 query - X-X



I would say that, in any case, it be important for the
programmer to know what the compiler is doing, for
mathematically rigorous computations.  Are there cases
that we haven't foreseen?

Baker

On 07/03/2013 01:36 PM, Kreinovich, Vladik wrote:
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,



--

---------------------------------------------------------------
Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------