id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
21754 Held symbolic powers cannot be approximated numerically rws "Maybe a bit obscure but still a bug:
{{{
sage: SR(2).power(SR(QQbar(3).sqrt() + QQbar(2).sqrt()), hold=True)
2^3.146264369941973?
sage: _.n()
...
TypeError: no canonical coercion from Algebraic Field to Rational Field
}}}
Reason is that in `Expression.n()` the special sum treatment via `class DefiniteSumExpander(ExpressionTreeWalker)` leaves arithmetic operations to the superclass where (if all numeric) they are reduced to their non-symbolic calls, i.e. here, `2^QQbar(...)` which gives the error (correctly, see https://groups.google.com/forum/?hl=en#!topic/sage-support/_7eGYj92Igw).
As we want to hold the power until later numerical conversion we want to override `arithmetic` in `DefiniteSumExpander`." defect needs_info minor sage-7.5 symbolics Ralf Stephan Vincent Delecroix N/A u/rws/held_symbolic_powers_cannot_be_approximated_numerically e1279df568cd86ba1e42a00a71db6f689b19825b