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 46b9c28 commit 7c23abdCopy full SHA for 7c23abd
include/xsf/expint.h
@@ -149,6 +149,9 @@ XSF_HOST_DEVICE inline double expi(double x) {
149
}
150
151
ei = ga + std::log(x) + x * ei;
152
+ } else if (std::isinf(x)) {
153
+ // Special use-case needed because exp(inf) / inf is undefined/NaN
154
+ return std::numeric_limits<double>::infinity();
155
} else {
156
// Asymptotic expansion (the series is not convergent)
157
ei = 1.0;
0 commit comments