|
I added a definition of a procedure rational_power->xreal to the Abstractions page, in the file xreal-1_precfunc-1-ratpowers-1.scm. I didn't test it extensively, but I'm pretty sure that it's right. I also didn't put in checks that the arguments are truly rational.
rational_power->xreal should be useful in constructing test cases for definitions intended to provide the precfunc implementation of the xreal abstraction with irrational arguments but predictable mathematically rational results. When the result of an xreal operation is mathematically rational (although not recognized by Scheme as rational), you can test it pretty well by asking for small intervals and verifying that the correct rational result(in the Scheme rational form) is in the interval.
Mike O'D.
|