24 #ifndef ARM_COMPUTE_UTILS_HELPERS_FLOAT_OPS_H 25 #define ARM_COMPUTE_UTILS_HELPERS_FLOAT_OPS_H 57 return (
i32 >> 23) & 0xFF;
65 return i32 & 0x007FFFFF;
86 const int ulps = std::abs(ra.
i32 - rb.
i32);
87 return ulps <= max_allowed_ulps;
99 return std::abs(1.0f - a) <=
epsilon;
111 return std::abs(0.0f - a) <=
epsilon;
bool is_one(float a, float epsilon=0.00001f)
Checks if the input floating point number is 1.0f checking if the difference is within a range define...
int32_t exponent() const
Extract exponent of floating point number.
bool is_equal_ulps(float a, float b, int max_allowed_ulps=0)
Checks if two floating point numbers are equal given an allowed number of ULPs.
Copyright (c) 2017-2021 Arm Limited.
RawFloat(float val)
Constructor.
int32_t mantissa() const
Extract mantissa of floating point number.
bool is_zero(float a, float epsilon=0.00001f)
Checks if the input floating point number is 0.0f checking if the difference is within a range define...
int32_t sign() const
Extract sign of floating point number.