Determine encoding for floating point values
.determineEncoding(
x,
precision = "single",
decimals = NULL,
range = NULL,
fields = NULL
)
numeric(.)
a set of numeric values for which to
determine the floating point encoding.
character(1)
option that determines the
configuration of the floating point encoding. Possible values are
"half"
[1.5.10], "bfloat16"
[1.8.7], "tensor19"
[1.8.10], "fp24"
[1.7.16], "pxr24"
[1.8.15],
"single"
[1.8.23], "double"
[1.11.52] and "auto"
(where the positions are determined based on the provided numeric values in
x
; not supported yet).
integer(1)
the number of decimal digits that
should be reliably represented, not supported yet.
numeric(2)
the ratio between the smallest and
largest possible value to be reliably represented, not supported yet.
list(3)
list that controls how many bits are
allocated to sign
, exponent
and mantissa
for encoding
the numeric values.
For background information study for instance 'Floating Point' by Thomas Finley and check out https://float.exposed/ to play around with floating point encoding.