4. Math bit helpers¶
This module represents collection of bit representation routines, which allow accessing integer and floating point values packed into different types.
All functions and symbols are in “math_bits” module, or publicly available via “math_boost”. Use require to get access to it.
require daslib/math_bits
require daslib/math_boost
4.1. float in int,uint¶
-
int_bits_to_float
(x: int const)¶
int_bits_to_float returns float
argument |
argument type |
---|---|
x |
int const |
bit representation of x is interpreted as a float
-
int_bits_to_float
(x: int2 const)
int_bits_to_float returns float2
argument |
argument type |
---|---|
x |
int2 const |
bit representation of x is interpreted as a float
-
int_bits_to_float
(x: int3 const)
int_bits_to_float returns float3
argument |
argument type |
---|---|
x |
int3 const |
bit representation of x is interpreted as a float
-
int_bits_to_float
(x: int4 const)
int_bits_to_float returns float4
argument |
argument type |
---|---|
x |
int4 const |
bit representation of x is interpreted as a float
-
uint_bits_to_float
(x: uint const)¶
uint_bits_to_float returns float
argument |
argument type |
---|---|
x |
uint const |
bit representation of x is interpreted as a float
-
uint_bits_to_float
(x: uint2 const)
uint_bits_to_float returns float2
argument |
argument type |
---|---|
x |
uint2 const |
bit representation of x is interpreted as a float
-
uint_bits_to_float
(x: uint3 const)
uint_bits_to_float returns float3
argument |
argument type |
---|---|
x |
uint3 const |
bit representation of x is interpreted as a float
-
uint_bits_to_float
(x: uint4 const)
uint_bits_to_float returns float4
argument |
argument type |
---|---|
x |
uint4 const |
bit representation of x is interpreted as a float
4.2. int,uint in float¶
-
float_bits_to_int
(x: float const)¶
float_bits_to_int returns int
argument |
argument type |
---|---|
x |
float const |
bit representation of x is interpreted as a int
-
float_bits_to_int
(x: float2 const)
float_bits_to_int returns int2
argument |
argument type |
---|---|
x |
float2 const |
bit representation of x is interpreted as a int
-
float_bits_to_int
(x: float3 const)
float_bits_to_int returns int3
argument |
argument type |
---|---|
x |
float3 const |
bit representation of x is interpreted as a int
-
float_bits_to_int
(x: float4 const)
float_bits_to_int returns int4
argument |
argument type |
---|---|
x |
float4 const |
bit representation of x is interpreted as a int
-
float_bits_to_uint
(x: float const)¶
float_bits_to_uint returns uint
argument |
argument type |
---|---|
x |
float const |
bit representation of x is interpreted as a uint
-
float_bits_to_uint
(x: float2 const)
float_bits_to_uint returns uint2
argument |
argument type |
---|---|
x |
float2 const |
bit representation of x is interpreted as a uint
-
float_bits_to_uint
(x: float3 const)
float_bits_to_uint returns uint3
argument |
argument type |
---|---|
x |
float3 const |
bit representation of x is interpreted as a uint
-
float_bits_to_uint
(x: float4 const)
float_bits_to_uint returns uint4
argument |
argument type |
---|---|
x |
float4 const |
bit representation of x is interpreted as a uint
4.3. int64,uint64 in double¶
-
int64_bits_to_double
(x: int64 const)¶
int64_bits_to_double returns double
argument |
argument type |
---|---|
x |
int64 const |
bit representation of x is interpreted as a double
-
uint64_bits_to_double
(x: uint64 const)¶
uint64_bits_to_double returns double
argument |
argument type |
---|---|
x |
uint64 const |
bit representation of x is interpreted as a double
-
double_bits_to_int64
(x: double const)¶
double_bits_to_int64 returns int64
argument |
argument type |
---|---|
x |
double const |
bit representation of x is interpreted as a int64
-
double_bits_to_uint64
(x: double const)¶
double_bits_to_uint64 returns uint64
argument |
argument type |
---|---|
x |
double const |
bit representation of x is interpreted as a uint64