diff --git a/include/armadillo_bits/op_expmat_meat.hpp b/include/armadillo_bits/op_expmat_meat.hpp index 7278cabc..3d8b0806 100644 --- a/include/armadillo_bits/op_expmat_meat.hpp +++ b/include/armadillo_bits/op_expmat_meat.hpp @@ -108,11 +108,11 @@ op_expmat::apply_direct(Mat& out, const Base T(0)) ? double(eop_aux::log2(norm_val)) : double(0); + int exponent = int(0); std::frexp(norm_val, &exponent); - int exponent = int(0); std::frexp(log2_val, &exponent); + const uword s = (std::min)( uword( (std::max)(int(0), exponent) ), uword(1023) ); - const uword s = uword( (std::max)(int(0), exponent + int(1)) ); + arma_debug_print("op_expmat: s: ", s); A /= eT(eop_aux::pow(double(2), double(s))); @@ -125,7 +125,7 @@ op_expmat::apply_direct(Mat& out, const Base