outrun/outrun-core/lib/float.run

19 lines
623 B
Text

```doc
# Float
This protocol defines all the protocols and functions required for a value to masquerade as a floating point number.
```
protocol Float,
requires:
AbsoluteValue + Addition + Division + Equality + Greater + GreaterOrEqual +
Less + LessOrEqual + Multiplication + Negation,
as: do
def nan?(self: Self): Boolean
def infinite?(self: Self): Boolean
def finite?(self: Self): Boolean
def subnormal?(self: Self): Boolean
def normal?(self: Self): Boolean
def sign_positive?(self: Self): Boolean
def sign_negative?(self: Self): Boolean
def inverse(self: Self): Option
end