Skip to content

Commit 3656499

Browse files
committed
test accuracy
1 parent 596ec95 commit 3656499

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/basicfuns.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ end
107107
@test @inferred(logcosh(x)) === x
108108
@test @inferred(logabssinh(x)) === x
109109
end
110+
111+
@testset "accuracy of `logcosh`" begin
112+
for t in (Float32, Float64)
113+
for x in range(start = t(-3), stop = t(3), length = 1000)
114+
@test ulp_error(logcosh, x) < 3
115+
end
116+
end
117+
end
110118
end
111119

112120
@testset "log1psq" begin

0 commit comments

Comments
 (0)