Feedback 0 is a minor problem as an interval endpoint, a real problem as a real divisor 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project Step #2, deadline Wednesday 13 November (Mike O'Donnell)
Re: Question multiplication by 0 (Katie Edmonds)
Date: 2002, Nov 13
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

Multiplying by the xreal 0 is not necessarily a problem. In calculating the appropriate precision, you will normally divide by the maximum absolute value of an interval. That is only 0 when the interval is [0,0]. You're right that this will occur with (rational->xreal 0). So you need a test to make sure that the maximum absolute value is not 0 before dividing. When it is, you might as well return [0,0] for the product.

Notice that it is the maximum absolute value of an interval endpoint that you need to check for 0, not the value of an xreal.




Mike O'D.


Messages

1. Feedback ratintvls and xreals by Mark Kittisopikul, 2002, Nov 13
1. Feedback Definetly Works by Benedict Singer, 2002, Nov 13
2. Feedback Division by 0 can come up in the precision calculation by Mike O'Donnell, 2002, Nov 13

to: "0 is a minor problem as an interval endpoint, a real problem as a real divisor"