Skip to content

Commit 3de6c48

Browse files
authored
More robust use of isapprox when checking time steps in tdvp (#107)
1 parent dd0ddef commit 3de6c48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solvers/tdvp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ end
3131
function time_step_and_nsteps(t, time_step, nsteps::Nothing)
3232
nsteps_float = t / time_step
3333
nsteps_rounded = round(nsteps_float)
34-
if abs(nsteps_float - nsteps_rounded) 0
34+
if nsteps_float nsteps_rounded
3535
return error("`t / time_step = $t / $time_step = $(t / time_step)` must be an integer.")
3636
end
3737
return time_step, Int(nsteps_rounded)

0 commit comments

Comments
 (0)