We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9e938b commit 686019eCopy full SHA for 686019e
test/runtests.jl
@@ -342,3 +342,13 @@ end
342
@test -zero(Float8) == sign(-zero(Float8))
343
@test -zero(Float8_4) == sign(-zero(Float8_4))
344
end
345
+
346
+@testset "Promotion" begin
347
+ @test Float8(2)*Float16(2) == Float16(4)
348
+ @test Float8(2)*Float32(2) == Float32(4)
349
+ @test Float8(2)*Float64(2) == Float64(4)
350
351
+ @test true*Float8(2) == Float8(2)
352
+ @test false*Float8(2) == zero(Float8)
353
+ @test 2*Float8(2) == Float8(4)
354
+end
0 commit comments