| 1 | initial version |
You should be able to just check if it has no variables.
def is_numerically_evaluable(expr):
return not expr.variables()
Then:
sage: is_numerically_evaluable(sin(1))
True
sage: is_numerically_evaluable(x)
False
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.