@@ -1770,6 +1770,27 @@ end
1770
1770
@test cld (- 1.1 , 0.1 ) == div (- 1.1 , 0.1 , RoundUp) == ceil (big (- 1.1 )/ big (0.1 )) == - 11.0
1771
1771
@test fld (- 1.1 , 0.1 ) == div (- 1.1 , 0.1 , RoundDown) == floor (big (- 1.1 )/ big (0.1 )) == - 12.0
1772
1772
end
1773
+ @testset " issue #49450" begin
1774
+ @test div (514 , Float16 (0.75 )) === Float16 (685 )
1775
+ @test fld (514 , Float16 (0.75 )) === Float16 (685 )
1776
+ @test cld (515 , Float16 (0.75 )) === Float16 (687 )
1777
+
1778
+ @test cld (1 , Float16 (0.000999 )) === Float16 (1001 )
1779
+ @test cld (2 , Float16 (0.001999 )) === Float16 (1001 )
1780
+ @test cld (3 , Float16 (0.002934 )) === Float16 (1023 )
1781
+ @test cld (4 , Float16 (0.003998 )) === Float16 (1001 )
1782
+ @test fld (5 , Float16 (0.004925 )) === Float16 (1015 )
1783
+
1784
+ @test div (4_194_307 , Float32 (0.75 )) === Float32 (5_592_409 )
1785
+ @test fld (4_194_307 , Float32 (0.75 )) === Float32 (5_592_409 )
1786
+ @test cld (4_194_308 , Float32 (0.75 )) === Float32 (5_592_411 )
1787
+
1788
+ @test fld (5 , Float32 (6.556511e-7 )) === Float32 (7_626_007 )
1789
+ @test fld (10 , Float32 (1.3113022e-6 )) === Float32 (7_626_007 )
1790
+ @test fld (11 , Float32 (1.4305115e-6 )) === Float32 (7_689_557 )
1791
+ @test cld (16 , Float32 (2.8014183e-6 )) === Float32 (5_711_393 )
1792
+ @test cld (17 , Float32 (2.2053719e-6 )) === Float32 (7_708_451 )
1793
+ end
1773
1794
end
1774
1795
@testset " return types" begin
1775
1796
for T in (Int8,Int16,Int32,Int64,Int128, UInt8,UInt16,UInt32,UInt64,UInt128)
0 commit comments