Skip to content

Commit 0a755b6

Browse files
committed
NaN edge case for erf(x)
1 parent da16cb1 commit 0a755b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/erf.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ function _erf(x::Float64)
324324
end
325325
else
326326

327+
if(isnan(x))
328+
return NaN
329+
end
327330

328331
if (sign)
329332
return -1.0

0 commit comments

Comments
 (0)