frexp

Contents

frexp#

Return the normalized fraction and exponent part of a floating point number

template<typename OpA>
__MATX_INLINE__ auto matx::frexp(const OpA &a)#

Examples#

// Input data
auto tiv0  = make_tensor<TestType>({10});

// Output fractional/integer parts
auto tofrac = make_tensor<TestType>({10});
auto toint  = make_tensor<int>({10});

// Create operators representing fractional and integer
const auto [ofrac, oint] = frexp(tiv0);
(tiv0 = random<TestType>(tiv0.Shape(), NORMAL)).run(exec);
(tofrac = ofrac, toint = oint).run(exec);