Repository navigation
Add lbeta - #1498
Add lbeta#1498
Conversation
|
@JacobHass8 , @dschmitz89 : We'll work here on |
|
|
|
@dschmitz89 , @jzmaddock , @JacobHass8 : Ready for review. |
|
The error plots look good to me. Could you explain them a little though to someone who is not used to them? The y axis unit are ULPs, so we see epsilon differences? And what are the green lines? Error Percentiles? |
|
@dschmitz89 : The green lines are "condition number envelopes". In general, it's hard to achieve correctly rounded outputs for correctly rounded inputs without using higher intermediate precision and massive slowdown. So instead we take a checkdown and say "the input itself is probably rounded to half an ulp." So Of course, this can go below a half-ulp, which is the best achievable accuracy. So we take |
|
@NAThompson once this is generally good can you add a CUDA test since the function is marked as GPU compatible? |
|
@mborland : Done. |
|
This looks good to me, I'll add some specific comments in the code. |
…on's color lbeta takes the log of beta's Lanczos form term by term, so it neither underflows nor cancels for large arguments. Groundwork for #1173. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
real_concept's own log is double precision on platforms with a wider long double. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… arithmetic Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It is negligible for beta but costs up to 20 ulps in the log when a is huge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previously it returned NaN; also fixes "Stirling" in the beta docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generic path otherwise threw from log1p or tripped an assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@dschmitz89 , @mborland , @jzmaddock , @JacobHass8 : Feel free to add any additional comments on these and I'll take them on in a fixup commit. |
lbeta takes the log of beta's Lanczos form term by term, so it neither underflows nor cancels for large arguments. Groundwork for #1173.
Also marks cropped ulps_plot points with crosses in their function's color, so clipped errors stay attributable when several functions share a plot.
ulps against a 200-digit reference (400 for cpp_bin_float_100): lbeta in blue, log(beta) in orange; crosses are clipped or -inf.
🤖 Generated with Claude Code