Skip to content

Commit

Permalink
Increase threshold for switching to double-double in log1p.
Browse files Browse the repository at this point in the history
  • Loading branch information
WarrenWeckesser committed Aug 3, 2023
1 parent b20b05b commit adcf29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/log1p/log1p_ufunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void log1p_D_D_loop(char **args, const npy_intp *dimensions,
}
else {
if (x > -2.2 && x < 0.2 && y > -1.2 && y < 1.2
&& fabs(x*(2.0 + x) + y*y) < 0.1) {
&& fabs(x*(2.0 + x) + y*y) < 0.4) {
// The input is close to the unit circle centered at -1+0j.
// Use double-double to evaluate the real part of the result.
lnr = 0.5*log1p(foo(x, y));
Expand Down

0 comments on commit adcf29c

Please sign in to comment.