Skip to content

Commit 4be96c2

Browse files
Fix NaN check
1 parent 89f2558 commit 4be96c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/src/dev/compute_convergence.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ function compute_convergence!(
169169
float_str(x) = @sprintf "%.4f" x
170170
pow_str(x) = "10^{$(@sprintf "%.1f" log10(x))}"
171171
function si_str(x)
172-
x in (0, Inf, -Inf, NaN) && return string(x)
172+
if isnan(x) || x in (0, Inf, -Inf)
173+
return string(x)
174+
end
173175
exponent = floor(Int, log10(x))
174176
mantissa = x / 10.0^exponent
175177
return "$(float_str(mantissa)) \\times 10^{$exponent}"

0 commit comments

Comments
 (0)