The procedure fails for negative exponents:
1 ]=> (exp -5) ;Value: 6.737946999085465e-3 1 ]=> ((exp_xreal (rational->xreal -5)) 0.5) ;Value 9: (0 1/243) 1 ]=> (exact->inexact (car ((exp_xreal (rational->xreal -5)) 0.5))) ;Value: 0. 1 ]=> (exact->inexact (cadr ((exp_xreal (rational->xreal -5)) 0.5))) ;Value: .00411522633744856(exp -5) reports a number at about 0.006... but the exp_xreal is telling us the number is between 0 and 0.004... which is incorrect. Checking integral powers greater than or equal to 2 gives an interval (0 3^n). A power of -1 seems to be working: 1 ]=> ((exp_xreal (rational->xreal -1)) 0.5) ;Value 14: (0 6839/18570)My guess is that instead of using 3^n, you must use 2^n for n < 0 when you scale it. |
Yet another correction to exp_ratintvl->ratintvl by Mike O'Donnell, 2002, Nov 29
to: