Better docs

This commit is contained in:
Fabian Schmalzried 2024-03-19 16:36:03 +01:00
parent d6aaf96e74
commit 8f217aa51a
No known key found for this signature in database
GPG key ID: D691D5DA4CEF42E7

View file

@ -1414,15 +1414,21 @@ toF32Checked : Num * -> Result F32 [OutOfBounds]
toF64Checked : Num * -> Result F64 [OutOfBounds]
## Turns a [Dec] into its [I128] representation by removing the decimal point.
## This is equivalent to multiplying the [Dec] by 10^18.
withoutDecimalPoint : Dec -> I128
## Turns a [I128] into the coresponding [Dec] by adding the decimal point.
## This is equivalent to dividing the [I128] by 10^18.
withDecimalPoint : I128 -> Dec
## Splits a [F32] into its components according to IEEE 754 standard.
f32ToParts : F32 -> { sign : Bool, exponent : U8, fraction : U32 }
## Splits a [F64] into its components according to IEEE 754 standard.
f64ToParts : F64 -> { sign : Bool, exponent : U16, fraction : U64 }
## Compine parts of a [F32] according to IEEE 754 standard.
f32FromParts : { sign : Bool, exponent : U8, fraction : U32 } -> F32
## Compine parts of a [F46] according to IEEE 754 standard.
f64FromParts : { sign : Bool, exponent : U16, fraction : U64 } -> F64