Numeric Programming With Spire
summary
Spire is a Scala numeric library that combines cats-kernel and algebra to give a large typeclass tower (semigroup, monoid, group, ring, field) plus custom types and tools: rationals with an R string interpolation macro, SafeLong (fast fallback to BigInt), computable reals that approximate to a requested precision, and interval arithmetic with intersections and confidence ranges. Discipline law checks run hundreds of tests (floating-point instances fail many laws), and macros/optimizations aim for both speed and precision.
AI-written summary · about
chapters (14)
- 0:00Talk introduction
- 2:54What is Spire library
- 6:23Algebra basics explained
- 10:40Semigroup and monoid traits
- 17:21Map merge demo
- 19:26Floating point limitations
- 21:12Group and ring hierarchies
- 24:45Law checking with Discipline
- 27:12Custom number types overview
- 31:02Rational numbers demo
- 34:35Computable real numbers
- 41:58Interval arithmetic
- 45:32Other Spire features
- 47:00Project status and thanks
related talks
50mPick your number type with Spire
45mTypelevel Programming 101: The Subspace of Scala
25mLEVERAGING SPIRE FOR COMPLEX TIME ALLOCATION LOGIC
21mLawful AI
30mLessons Learned from 15 Years of Scala in the Wild
41mLeveraging Spire for complex time allocation logic
01h 05mScala: The Simple Parts
45mHow to be polymorphic in Scala
