Skip to content

Commit 277b76e

Browse files
authored
eliminate an exp at the low end of screening (#1893)
(found this while testing profiling for our hackathon on Thurs)
1 parent fcb7c76 commit 277b76e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

screening/screen.H

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ number_t actual_screen5 (const plasma_state_t<number_t>& state,
330330

331331
// machine limit the output
332332
// further limit to avoid the pycnonuclear regime
333-
h12 = admath::max(admath::min(h12, h12_max), 0.0_rt);
333+
h12 = admath::min(h12, h12_max);
334+
if (h12 <= 0.0) {
335+
return 1.0;
336+
}
334337
return admath::exp(h12);
335338
}
336339

0 commit comments

Comments
 (0)