We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 909d894 commit 190e5d3Copy full SHA for 190e5d3
dpctl/tensor/libtensor/include/kernels/elementwise_functions/log1p.hpp
@@ -82,15 +82,15 @@ template <typename argT, typename resT> struct Log1pFunctor
82
// imaginary part of result
83
const realT res_im = std::atan2(y, x + 1);
84
85
- if (std::max(std::abs(x), std::abs(y)) < realT(.1)) {
+ if (std::max(std::abs(x), std::abs(y)) < realT{.1}) {
86
const realT v = x * (2 + x) + y * y;
87
- return {std::log1p(v) / 2, res_im};
+ return resT{std::log1p(v) / 2, res_im};
88
}
89
else {
90
// when not close to zero,
91
// prevent overflow
92
const realT m = std::hypot(x + 1, y);
93
- return {std::log(m), res_im};
+ return resT{std::log(m), res_im};
94
95
96
0 commit comments