Skip to content

Commit 563769b

Browse files
committed
delete debugging throw
Should not be necessary now we have some tests in the test suite.
1 parent dd7e0d9 commit 563769b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

test/testhelpers/ULPError.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
module ULPError
44
export ulp_error, ulp_error_maximum
5-
@noinline function throw_invalid()
6-
throw(ArgumentError("invalid"))
7-
end
85
function ulp_error(accurate::AbstractFloat, approximate::AbstractFloat)
96
# the ULP error is usually not required to great accuracy, so `Float32` should be precise enough
107
zero_return = 0f0
@@ -29,11 +26,7 @@ module ULPError
2926
end
3027
end
3128
acc = Float64(accurate)::Float64
32-
err = abs(Float32((approximate - acc) / eps(approximate))::Float32)
33-
if isnan(err)
34-
@noinline throw_invalid() # unexpected
35-
end
36-
err
29+
abs(Float32((approximate - acc) / eps(approximate))::Float32)
3730
end
3831
function ulp_error(accurate::Acc, approximate::App, x::AbstractFloat) where {Acc, App}
3932
acc = accurate(x)

0 commit comments

Comments
 (0)