spire
spire copied to clipboard
Powerful new number types and numeric abstractions for Scala.
This task is just about going through all the number types and being sure that they support the same methods and that there aren't major inconsistencies. This includes things like...
In many ways Intervals are a lot more flexible than Scala's `Range` type. It would be nice to be able to iterate across an interval, or to produce a collection...
Right now we use relatively naive code to compute the mean of a collection (via `qmean` ). It would be good to make this somewhat pluggable. The existing pull request...
When implementing a wrapper type, there is often a ton of boilerplate. It would be great to build one (or more) proxy types that make this easier to do. It...
scala> big"100" res168: scala.math.BigInt = 100 scala> big"1000" error: exception during macro expansion: java.lang.NumberFormatException: illegal SI BigInt constant at spire.macrosk.Macros$.handleBigInt(Macros.scala:186) at spire.macrosk.Macros$.siBigInt(Macros.scala:205) scala> BigInt("1000") res170: scala.math.BigInt = 1000
Two nice ideas to improve test coverage: #627 Use homomorphisms between algebraic structures to provide additional tests #642 Have tests for limited range primitives
Now that I know this part by heart, what could be the next steps ? I'm thinking of: - [ ] add ref. to literature about implementation of open/closed intervals...
These two lines are equivalent in `object Polynomial`: ```scala def linear[@sp(Double) C: Eq: Semiring: ClassTag](c1: C, c0: C): Polynomial[C] = Polynomial(Map((1, c1), (0, c0))) def quadratic[@sp(Double) C: Eq: Semiring: ClassTag](c1:...
Hi, Would it be possible to expose the XIsNumeric traits to the public API? Or otherwise the ConvertibleFromX and ConvertibleToX traits? I am currently trying to write some type classes...
We had the following special case: ```scala final override def gcd(x: Polynomial[C], y: Polynomial[C])(implicit ev: Eq[Polynomial[C]]): Polynomial[C] = { val result = EuclideanRing.euclid(x, y)(ev, self) if (result.degree > 0) {...