be careful about optimizing a+b-a-b !
George Corliss
uunet!antares.mcs.anl.gov!corliss
Sun May 10 04:13:32 PDT 1992
Whatever is decided about optimizing a+b-a-b, we must be careful not
to be TOO aggressive. At least one popular symbolic algebra system
"simplifies" sin (asin (10)) = 10 !!! We surely don't want Fortran
or C to do that.
Also, if a and b are user-defined types, such optimization is not
appropriate. If A is an interval, for example,
A - A = |A| * [-1, 1] not 0.
George F. Corliss (corlissamcs.anl.gov)
More information about the Numeric-interest
mailing list