File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 2121 @test Float64 (x+ y) == Float64 (BigFloat (x) + BigFloat (y))
2222 @test x+ y == Float128 (BigFloat (x) + BigFloat (y))
2323end
24+
25+ @testset " BigInt" begin
26+ x = parse (Float128, " 100.0" )
27+ y = parse (Float128, " 25.0" )
28+ @test Float64 (x+ y) == Float64 (BigInt (x) + BigInt (y))
29+ @test x+ y == Float128 (BigInt (x) + BigInt (y))
30+ end
31+
32+ @testset " flipsign" begin
33+ x = Float128 ( 2.0 )
34+ y = Float128 (- 2.0 )
35+ @test x == flipsign (y, - one (Float128))
36+ @test y == flipsign (y, 1 )
37+ end
38+
39+ @testset " modf" begin
40+ x = Float128 (pi )
41+ fpart, ipart = modf (x)
42+ @test x == ipart + fpart
43+ @test signbit (fpart) == signbit (ipart) == false
44+
45+ y = Float128 (- pi )
46+ fpart, ipart = modf (y)
47+ @test y == ipart + fpart
48+ @test signbit (fpart) == signbit (ipart) == true
49+
50+ z = x^ 3
51+ fpart, ipart = modf (x) .+ modf (y)
52+ @test x+ y == ipart+ fpart
53+ end
You can’t perform that action at this time.
0 commit comments