I thought it should be straight:
import spire.math.Rational val seq = Vector(Rational(1, 4), Rational(3, 4)) val sum = seq.sum
I assume that this is just a matter of bringing the correct material to an implicit volume. But what should I import?
I see that in order to get RationalIsNumeric I need to do something like this:
import spire.math.Numeric._ implicit val err = new ApproximationContext(Rational(1, 192)) implicit val num = RationalIsNumeric
But that just gives me spire.math.Numeric . Therefore, I try with this additionally:
import spire.math.compat._
But no luck ...
source share