Question Error in exp_xreal? 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project step #5, deadline Monday 2 December (Mike O'Donnell)
Date: 2002, Nov 28
From: Maris Goldmanis <mgoldma@uchicago.edu>

There seems to be an error in the exp_xreal procedure. The local procedure refine_exp_xr->ratintvl calls exp_ratintvl->ratintvl with (xr scale) as its interval argument. Consequently, subsequent calls of refine_exp_xr->ratintvl pass ever wider intervals to exp_ratintvl->ratintvl, while they aim at producing ever more precise results! Shouldn't the argument be (xr (/ 1 scale)) instead of (xr scale)?

It makes no difference with the single-point rational number intervals, but for any less trivial intervals the current procedure simply doesn't work. For example, (exp_xreal (rational_power->xreal 2 1/2)) is too slow even for precision 1/10... With (xr (/ 1 scale)) instead of (xr scale), the preceding example is still slow (for precision 1/100, the run time is 24450 on Admiral), but at least it does work.


Messages

1. Agree Yes, it should be (xr (/ 1 scale)): I posted a correction by Mike O'Donnell, 2002, Nov 28
2. Warning Something's wrong still... by Mark Kittisopikul, 2002, Nov 29
1. Feedback I corrected an error in the last clause of exp_ratintvl->ratintvl by Mike O'Donnell, 2002, Nov 29
2. Feedback It may be very difficult to make exponentiation efficient. by Mike O'Donnell, 2002, Nov 29
3. Warning Negative exponents by Mark Kittisopikul, 2002, Nov 29
1. Agree Yet another correction to exp_ratintvl->ratintvl by Mike O'Donnell, 2002, Nov 29

to: "Error in exp_xreal?"