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 <[email protected]>
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)?
>

Reply via email to