Skip to content

Commit 0444cc0

Browse files
committed
test: ULPError: faitfhul approximation
1 parent 48aaa3f commit 0444cc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/math.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ has_fma = Dict(
5959
@test Inf == @inferred ulp_error(Inf, 3.0)
6060
end
6161
end
62+
@testset "faithful" begin
63+
for x in (-2.0, -0.3, 0.1, 1.0)
64+
@test 1 == @inferred ulp_error(x, nextfloat(x, 1))
65+
@test 1 == @inferred ulp_error(x, nextfloat(x, -1))
66+
end
67+
end
6268
end
6369

6470
@testset "clamp" begin

0 commit comments

Comments
 (0)