Commit ba49ec0
committed
Calculate the initial condition using only real numbers
The other recursion coefficients were already all using only real
number types, but the initial condition was forgotten. This has worked
thus far, but a change in the upcoming Julia v1.9 (presumably
JuliaLang/julia#47255) broke the exact correspondance between real
inputs and real-axis complex inputs for the spherical normalization.
Specifically, on Julia 1.8:
```julia
julia> r = inv(sqrt(4convert(Float64, π)))
0.28209479177387814
julia> r - real(inv(sqrt(4convert(ComplexF64, π))))
0.0
```
while with Julia 1.9:
```julia
julia> r = inv(sqrt(4convert(Float64, π)))
0.28209479177387814
julia> r - real(inv(sqrt(4convert(ComplexF64, π))))
-5.551115123125783e-17
```
The simple change that allows the tests to pass again is to just ask
for the initial condition to be calculated in the appropriate real
number type.1 parent 4882061 commit ba49ec0
3 files changed
+3
-3
lines changed| 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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments