What is the use case of Integral[T] trait in Scala?

The issue is that if you use a standard Double or Float, then the range length is not guaranteed due to rounding errors. Their was quite a bit of discussion on this.

See for example this thread.

HTHs

1 Like