|
55 | 55 | @test isequal(im * T(+1.0), Complex(T(+0.0), T(+1.0))) |
56 | 56 | @test isequal(im * T(-1.0), Complex(T(-0.0), T(-1.0))) |
57 | 57 | end |
| 58 | + |
| 59 | + @testset "divide" begin |
| 60 | + @test isequal(T(+0.0) / im, Complex(T(+0.0), T(-0.0))) |
| 61 | + @test isequal(T(-0.0) / im, Complex(T(-0.0), T(+0.0))) |
| 62 | + @test isequal(T(+1.0) / im, Complex(T(+0.0), T(-1.0))) |
| 63 | + @test isequal(T(-1.0) / im, Complex(T(-0.0), T(+1.0))) |
| 64 | + end |
58 | 65 | end |
59 | 66 | @test isequal(true + complex(true,false), complex(true,false) + complex(true,false)) |
60 | 67 | @test isequal(complex(true,false) + true, complex(true,false) + complex(true,false)) |
|
925 | 932 | @test Float16(1)+Float16(1)im === Complex32(1, 1) |
926 | 933 | @test Float16(1)-Float16(1)im === Float16(1)+Float16(-1)im === Complex32(1, -1) |
927 | 934 | @test Float16(1)*im === Complex32(im) |
928 | | - @test Float16(1)/im === 1.0f0/im === Complex(0.0, -1.0) |
| 935 | + @test Float16(1)/im === Complex32(0,-1) |
929 | 936 | @test Float16(1)^im === Complex32(1) === Float16(1)+Float16(0)im |
930 | 937 | end |
931 | 938 |
|
|
959 | 966 | @inferred expm1(x) |
960 | 967 | end |
961 | 968 | end |
| 969 | + |
| 970 | +# issue #19240 |
| 971 | +@test big(1)/(10+10im) ≈ (5-5im)/big(100) ≈ big"0.05" - big"0.05"*im |
0 commit comments