MiniFloat

sealed abstract class MiniFloat

A floating-point number with a range of values small enough to make it efficient to test every value.

MiniFloat can have one of the following 14 values:

  • NegativeInfinity

  • -8.0

  • -4.0

  • -2.0

  • -1.0

  • -0.5

  • 0.0

  • 0.5

  • 1.0

  • 2.0

  • 4.0

  • 8.0

  • PositiveInfinity

  • NaN

In almost all respects (overflows, value approximation, floating point errors) it behaves similarly to Float and Double. The main difference is that MiniFloat does not support the -0.0 value, which is represented as 0.0.

Companion:
object
class Object
trait Matchable
class Any
object NaN.type
object NegativeInfinity.type
object PositiveInfinity.type

Value members

Concrete methods

def *(that: MiniFloat): MiniFloat
def +(that: MiniFloat): MiniFloat
def -(that: MiniFloat): MiniFloat
def /(that: MiniFloat): MiniFloat
override def equals(other: Any): Boolean
Definition Classes
Any
override def hashCode: Int
Definition Classes
Any
def toInt: Int
override def toString: String
Definition Classes
Any

Concrete fields