We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8efca1 commit f2d1fc3Copy full SHA for f2d1fc3
1 file changed
diffrax/_integrate.py
@@ -303,6 +303,11 @@ def loop(
303
t1_clip_floor = t1
304
for _ in range(100):
305
t1_clip_floor = eqxi.prevbefore(t1_clip_floor)
306
+ if jnp.sign(t1_clip_floor - t0) != jnp.sign(t1 - t0):
307
+ raise ValueError(
308
+ "t0 and t1 are within 100 units of least precision "
309
+ "implying a high risk of floating point error. Aborting."
310
+ )
311
312
if saveat.dense:
313
dense_ts = init_state.dense_ts
0 commit comments