You are right; it did not work. I made some modifications to fix it, but they required a significant rethinking of many of the methods, so it would be a different type entirely. Nemo supports rational functions in any case, and I think that's a better idea.
On Sunday, February 7, 2016 at 11:21:17 AM UTC-5, Stefan Karpinski wrote: > > There are various assumptions baked into the rational code that may or may > not be satisfied by non-integer numeric types. I would suggest taking the > code from Base and trying it out without that restriction and seeing how it > goes. > > On Saturday, February 6, 2016, Fengyang Wang <fengya...@gmail.com > <javascript:>> wrote: > >> I was looking for a Julia package to handle rational functions, when I >> noticed that the `Polynomials` package implements `gcd`, `div`, and `rem`. >> So it would be possible to simply use `Rational{Poly}`... or so I thought. >> Unfortunately, the type `Rational` prevents this use, since it requires its >> type parameter to derive from `Integer`. >> >> I think it would be more in line with Julia's goal of polymorphism if >> `Rational` "just worked" with any Euclidean domain. Is there some >> justification for the current behaviour, or should I file this as a issue >> (or make a pull request)? >> >