-
-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Description
Automatic evaluation of symbolic expressions of "numerics" prevents construction of such expressions despite them being perfectly numerically approximatable (or otherwise useful) if exact evaluation in the algebraic sense fails. This is usually not a problem with function expressions (because of the easily added hold=True
), and sums and products (?), but powers have to be constructed awkwardly:
sage: SR(2) ^ SR(QQbar(sqrt(2)))
Traceback (most recent call last):
...
TypeError: no canonical coercion ...
sage: SR(2).power(SR(QQbar(sqrt(2))), hold=True)
2^1.414213562373095?
The ticket catches TypeError
s in the first case and automatically uses the second form, to allow:
sage: SR(2) ^ SR(QQbar(sqrt(2)))
2^1.414213562373095?
CC: @videlec
Component: symbolics
Author: Ralf Stephan
Branch/Commit: u/rws/hold_symbolic_powers_unevaluated_if_evaluation_fails @ 49ab133
Issue created by migration from https://trac.sagemath.org/ticket/21758