Float64
Definitions
Returns x rounded up to a Float64 representing the nearest larger integer value.
Convert x to a Float32.
Returns x clamped within the Float32 range min to max.
def clampToInt16(min: { min = Int16 }, max: { max = Int16 }, nanValue: { nanValue = Int16 }, x: Float64): Int16§ SourceConvert x to an Int16.
Returns x clamped within the Int16 range min to max.
Warning: it is recommended to test x for NaN (not-a-number) before calling this
function. Relying on nanValue to convert NaN to a permissable Int16 risks masking it.
def clampToInt32(min: { min = Int32 }, max: { max = Int32 }, nanValue: { nanValue = Int32 }, x: Float64): Int32§ SourceConvert x to an Int32.
Returns x clamped within the Int32 range min to max.
Warning: it is recommended to test x for NaN (not-a-number) before calling this
function. Relying on nanValue to convert NaN to a permissable Int32 risks masking it.
def clampToInt64(min: { min = Int64 }, max: { max = Int64 }, nanValue: { nanValue = Int64 }, x: Float64): Int64§ SourceConvert x to an Int64.
Returns x clamped within the Int64 range min to max.
Warning: it is recommended to test x for NaN (not-a-number) before calling this
function. Relying on nanValue to convert NaN to a permissable Int64 risks masking it.
def clampToInt8(min: { min = Int8 }, max: { max = Int8 }, nanValue: { nanValue = Int8 }, x: Float64): Int8§ SourceConvert x to an Int8.
Returns x clamped within the Int8 range min to max.
Warning: it is recommended to test x for NaN (not-a-number) before calling this
function. Relying on nanValue to convert NaN to a permissable Int8 risks masking it.
Get the primitive Float64 value from its object representation (i.e. java.lang.Double).
This function is expected to be used when marshaling Float64s from Java. Generally in Flix
code you should not need to use java.lang.Double.
Returns x rounded down to a Float64 representing the nearest smaller integer value.
Parse the string s as a Float64, leading or trailing whitespace is trimmed.
A successful parse is wrapped with Some(x), a parse failure is indicated by None.
Returns true if and only if x is a non-infinite and non-Nan Float64 value.
Returns true if and only if x is an infinite and non-Nan Float64 value.
Returns the minimum positive number representable by a Float64.
Returns base raised to the power of n.
Returns x rounded to a Float64 representing the nearest integer value.
The rounding may be upwards or downwards. If the rounding up and rounding down are equally
close, x will be rounded to an even value (i.e. round(0.5f64) == 0.0f64).
Convert x to a Float32.
The numeric value of x may lose precision.
Convert x to an Int32 by truncation towards zero.
Returns 0 if x is NaN. Saturates to Int32.minValue() or Int32.maxValue()
if x is out of range or infinite.
Convert x to an Int64 by truncation towards zero.
Returns 0 if x is NaN. Saturates to Int64.minValue() or Int64.maxValue()
if x is out of range or infinite.
Convert x to an Option[BigDecimal].
Returns Some(x as BigDecimal) if the numeric value of x is representable
as a BigDecimal value.
If x is NaN or infinity return None.
Convert x to an Option[BigInt].
Returns Some(x as BigInt) if the numeric value of x is representable as a BigInt.
Returns None if the value of x is NaN or infinity.
Convert x to an Option[Float32].
Returns Some(x as Float32) if the numeric value of x is within the range
of Float32, loss of precision may occur.
Returns None if the numeric value of x is outside the range of Float32
(i.e. 1.4E-45 to 3.4028235E38).
If x is NaN return Some(Float32.NaN)``, if xis positive or negative infinity returnSome` wrapping the corresponding Float32 infinity.
Convert x to an Option[Int16].
Returns Some(x as Int16) if the numeric value of x is within the range
of Int16, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int16
(i.e. -32768 to 32767), or it is NaN or infinity.
Convert x to an Option[Int32].
Returns Some(x as Int32) if the numeric value of x is within the range
of Int32, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int32
(i.e. -2147483648 to 2147483647), or it is NaN or infinity.
Convert x to an Option[Int64].
Returns Some(x as Int64) if the numeric value of x is within the range
of Int64, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int64
(i.e. -9223372036854775808 to 9223372036854775807), or it is NaN or infinity.
Note: while the range of an Int64 is precisely defined using Int64 values, converting this range to Float64 values is imprecise.
Convert x to an Option[Int8].
Returns Some(x as Int8) if the numeric value of x is within the range
of Int8, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int8
(i.e. -128 to 127), or it is NaN or infinity.