Skip to content

Commit 51d60f1

Browse files
committed
test: fix doctest that presumes reproducible floats
1 parent 5f36898 commit 51d60f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/protosym/simplecas/expr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ def eval_f64(self, values: Optional[dict[Expr, float]] = None) -> float:
311311
>>> expr1 = sin(sin(1))
312312
>>> expr1
313313
sin(sin(1))
314-
>>> expr1.eval_f64()
315-
0.7456241416655579
314+
>>> expr1.eval_f64() # doctest: +ELLIPSIS
315+
0.7456241416655...
316316
317317
If the expression contains symbols to be substituted then they can be
318318
provided as a dictionary of values:
@@ -321,8 +321,8 @@ def eval_f64(self, values: Optional[dict[Expr, float]] = None) -> float:
321321
>>> expr2 = sin(sin(x))
322322
>>> expr2
323323
sin(sin(x))
324-
>>> expr2.eval_f64({x: 1.0})
325-
0.7456241416655579
324+
>>> expr2.eval_f64({x: 1.0}) # doctest: +ELLIPSIS
325+
0.7456241416655...
326326
327327
Python floats are based on IEEE 754 64-bit binary floating point which
328328
gives 53 bits of precision and a range of magnitudes approximately from

0 commit comments

Comments
 (0)