Intervals: Unifying Uncertainty, Ranges, and Loops



This talk is about intervals and interval arithmetic. Erik Osheim is a member of Typelevel, he maintains the Scala library Spire (alongside Tom Switzer), and he does Data Science and “Data Janitorial Work” at Meetup.

I like to say that I have sort of duel interest in expressiveness and performance. […] I try to keep both in mind, both are important

Erik explains how algebraic type classes support arithmetic over a wide range of types, works through some cases, and demonstrates how intervals can also be used in the place of Ranges, Sets, and Loops.

He covers:

  • Basic description of the Interval[_] type
  • Arithmetic, uncertainty, and error propagation
  • Set operations and iteration

Check out more of the code Erik has written at: https://github.com/non.

Further Resources

  • Scala Training from ProTech
  • Video & Tutorials on Scala
Published April 9, 2015