-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomplexComplex numbersComplex numbersrationalsThe Rational type and values thereofThe Rational type and values thereof
Description
This is the method:
Line 101 in 877de98
//(x::Number, y::Complex) = x*conj(y)//abs2(y) |
The math behind the transformation incorrectly assumes y
is finite and nonzero.
xref #53435, which concerns overflow caused by the same oneliner.
Test:
using Test
@testset "exact division by an infinite complex number" begin
for y ∈ (1 // 0, -1 // 0)
@test (7 // complex(y)) == (7 // y)
end
end
Resulting in:
Test Summary: | Error Total Time
exact division by a zero or infinite complex number | 3 3 1.6s
ERROR: Some tests did not pass: 0 passed, 0 failed, 3 errored, 0 broken.
nhz2
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomplexComplex numbersComplex numbersrationalsThe Rational type and values thereofThe Rational type and values thereof