Skip to contents

IEEE-754 binary32 field decomposition, reconstructed exactly (hmfp32)

Usage

morie_geron_fp32(x)

Arguments

x

Values to encode.

Value

List with value, sign, exponent, mantissa, reconstructed, rel_error, kind.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_fp32(V)
#> $value
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $sign
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $exponent
#> [1] 0 1 1 2 2 2 2 3
#> 
#> $exponent_field
#> [1] 127 128 128 129 129 129 129 130
#> 
#> $mantissa
#> [1] 0.00 0.00 0.50 0.00 0.25 0.50 0.75 0.00
#> 
#> $mantissa_field
#> [1]       0       0 4194304       0 2097152 4194304 6291456       0
#> 
#> $reconstructed
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $rel_error
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $eps
#> [1] 1.192093e-07
#> 
#> $max_normal
#> [1] 3.402823e+38
#> 
#> $min_normal
#> [1] 1.175494e-38
#> 
#> $kind
#> [1] "normal" "normal" "normal" "normal" "normal" "normal" "normal" "normal"
#> 
#> $bits_total
#> [1] 32
#> 
#> $estimate
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "IEEE-754 binary32 field decomposition via a uint32 bit view"
#>