We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From #19576,
>>> expr = (9*x + sqrt(3))/(3*sqrt(3)*x + 1) >>> expr.is_constant False
but
s = solve(minpoly(expr), x) v = set([expr.subs(x, i) for i in s]) if len(v) == 1: print (v.pop().is_constant) else: print (False)
gives True. Using the extension=True option to cancel also reduces this to a constant:
extension=True
cancel
>>> cancel(expr,extension=True) sqrt(3)
I'm not sure if there would be cases where the expression could be constant but the extension=True would fail.
I suspect that the false conclusion comes after evaluating expr._random() and comparing this float to the value obtained when using an integer for x.
expr._random()
x
The text was updated successfully, but these errors were encountered:
No branches or pull requests
From #19576,
but
gives True. Using the
extension=True
option tocancel
also reduces this to a constant:I'm not sure if there would be cases where the expression could be constant but the
extension=True
would fail.I suspect that the false conclusion comes after evaluating
expr._random()
and comparing this float to the value obtained when using an integer forx
.The text was updated successfully, but these errors were encountered: