non/scala-numerics-refactor — pull request #4 by tixxit (2011-12-30 20:30:00+00:00)
Title: Added nroot (and pow that takes Rational) to Rational.

They require an implicit ApproximationContext[Rational] to bound the _absolute_ error, so you'll need to create one to use the methods.

The biggest issue right now is that, in the convergence rate proof, I assume the initial approximation is pretty good (within 1/n relative error of the real nroot), but my initial approximation is just Rational(ceil(num nroot k),floor(den nroot k)), which can't really guarantee that bound :-\ Mostly this isn't noticeable, as the real rate seems to be much better anyways.