Commit 42ec04a
Fix the iop=2 Temme expansion variable and the ind=2 wide-band truncation (#538)
* Fix the iop=2 Temme expansion variable and the ind=2 wide-band truncation
The iop=2 branch expanded c0/c1 in d00/d10 instead of z (NSWC gratio label
270), dropping the z-dependence of the expansion, and the ind=2 wide band
discarded its computed 4-term expansion (label 230) in favour of the
narrow-band 2-term form (label 280). Add reference-point regression tests
for both branches.
* refactor: share the Temme (P,Q) combine step; tighten wide/narrow-band tolerances
Extract the c/w/t -> (P,Q) combine into _gamma_inc_temme_combine, used by
both gamma_inc_temme_1 and the ind=2 wide-band branch in _gamma_inc that
previously duplicated it inline.
Measured actual error against the mpmath references: wide-band tops out
at 1.3e-4, narrow-band at 4.6e-5, so tighten rtol from 5e-4 to 2e-4/1e-4
respectively (~1.5-2x margin) to catch regressions sooner.
* Extend the Temme (P,Q) combine helper to all 5 call sites
Fixes the docstring being pushed off gamma_inc_temme_1 by the
helper's insertion point; also folds in gamma_inc_minimax and
gamma_inc_temme, which had the same duplicated block.
* Bump version from 2.8.1 to 2.8.2
---------
Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com>1 parent 172df8d commit 42ec04a
3 files changed
Lines changed: 80 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
545 | 558 | | |
546 | 559 | | |
547 | 560 | | |
| |||
580 | 593 | | |
581 | 594 | | |
582 | 595 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
| 596 | + | |
590 | 597 | | |
591 | 598 | | |
592 | 599 | | |
| |||
600 | 607 | | |
601 | 608 | | |
602 | 609 | | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
| |||
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
| 639 | + | |
645 | 640 | | |
646 | 641 | | |
647 | 642 | | |
| |||
681 | 676 | | |
682 | 677 | | |
683 | 678 | | |
684 | | - | |
685 | | - | |
| 679 | + | |
| 680 | + | |
686 | 681 | | |
687 | 682 | | |
688 | 683 | | |
689 | 684 | | |
690 | 685 | | |
691 | 686 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 687 | + | |
699 | 688 | | |
700 | 689 | | |
701 | 690 | | |
| |||
919 | 908 | | |
920 | 909 | | |
921 | 910 | | |
922 | | - | |
| 911 | + | |
923 | 912 | | |
924 | 913 | | |
925 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
87 | 146 | | |
88 | 147 | | |
89 | 148 | | |
| |||
0 commit comments