Spire Numerical Analysis Library
Jump to navigation
Jump to search
A Spire Numerical Analysis Library is a Scala Numerical Analysis Library.
- …
- Counter-Example(s):
- See: typelevel Organization.
References
2014
- https://github.com/non/spire
- Using features such as specialization, macros, type classes, and implicits, Spire works hard to defy conventional wisdom around performance and precision trade-offs. A major goal is to allow developers to write efficient numeric code without having to "bake in" particular numeric representations. In most cases, generic implementations using Spire's specialized type classes perform identically to corresponding direct implementations.
...
In addition to supporting all of Scala's built-in number types, Spire introduces several new ones, all of which can be found in spire.math:
Natural
unsigned, immutable, arbitrary precision integer.Rational
fractions of integers with perfect precision.Algebraic
lazily-computed, arbitrary precision algebraic numbersReal
computable real number implementationComplex[A]
complex numbers, points on the complex plane.Jet[A]
N-dimensional dual numbers, for automatic differentiation.Quaternion[A]
extension of complex numbers into 4D spaceUByte
throughULong
value classes supporting unsigned operationsSafeLong
fast, overflow-proof integer typeNumber
boxed type supporting a traditional numeric towerFixedPoint
fractions with unboxed Long numerator and implicit denominatorInterval[A]
arithmetic on open, closed, and unbound intervalsPolynomial[A]
univariate (single-variable) polynomial expressionsTrilean
value class supporting three-valued logic
- …
- Using features such as specialization, macros, type classes, and implicits, Spire works hard to defy conventional wisdom around performance and precision trade-offs. A major goal is to allow developers to write efficient numeric code without having to "bake in" particular numeric representations. In most cases, generic implementations using Spire's specialized type classes perform identically to corresponding direct implementations.