Skip to content

Commit

Permalink
src/sage_setup/autogen/interpreters/specs/rdf.py: Avoid gratuitous us…
Browse files Browse the repository at this point in the history
…e of symbolics in doctest
  • Loading branch information
Matthias Koeppe committed Jun 19, 2023
1 parent d5812e4 commit 97135ad
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/sage_setup/autogen/interpreters/specs/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ def __init__(self):
Make sure that pow behaves reasonably::
sage: var('x,y') # optional - sage.symbolic
(x, y)
sage: ff = fast_callable(x^y, vars=[x,y], domain=RDF) # optional - sage.symbolic
sage: ff(1.5, 3) # optional - sage.symbolic
sage: from sage.ext.fast_callable import ExpressionTreeBuilder
sage: etb = ExpressionTreeBuilder(vars=('x','y'))
sage: x = etb.var('x')
sage: y = etb.var('y')
sage: ff = fast_callable(x^y, domain=RDF)
sage: ff(1.5, 3)
3.375
sage: ff(-2, 3) # optional - sage.symbolic
sage: ff(-2, 3)
-8.0
sage: ff(-2, 1/3) # optional - sage.symbolic
sage: ff(-2, 1/3)
Traceback (most recent call last):
...
ValueError: negative number to a fractional power not real
Expand Down

0 comments on commit 97135ad

Please sign in to comment.