Repository navigation
Commit a279390
authored
Preserve logGamma accuracy near one (#11130)
Avoid recurrence rounding that loses information when logGamma's
result is close to zero. At representable neighbors of one, this
can produce roughly 73% relative error above one and 246% below
one with both 53-bit and 64-bit real significands.
Evaluate a degree-ten Taylor expansion for |x - 1| <= 2^-13,
using the exactly representable displacement from one. Preserve
positive zero at one and bound the truncation error sufficiently
for binary128 precision.
Add regression coverage for adjacent values, both approximation
endpoints, and intermediate displacements using independent
high-precision references. Local benchmarks show substantially
faster evaluation near one.
AI-Assisted-By: Codex (GPT-6 Astra Medium)1 parent 918c061 commit a279390
1 file changed
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
644 | 668 | | |
645 | 669 | | |
646 | 670 | | |
| |||
693 | 717 | | |
694 | 718 | | |
695 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
696 | 744 | | |
697 | 745 | | |
698 | 746 | | |
| |||
0 commit comments