Comment #1 on issue 3947 by [email protected]: Roots of large numbers
http://code.google.com/p/sympy/issues/detail?id=3947
since factoring can be expensive, I think we choose not to make all powers
canonical, only those that are smaller than a certain limit. From
Integer._eval_power:
When exponent is a fraction (so we have for example a square root),
we try to find a simpler representation by factoring the argument
up to factors of 2**15, e.g.
- sqrt(4) becomes 2
- sqrt(-4) becomes 2*I
- (2**(3+7)*3**(6+7))**Rational(1,7) becomes 6*18**(3/7)
Further simplification would require a special call to factorint on
the argument which is not done here for sake of speed.
You can do the simplification like this
N
2*4213284111726743293784894879025636320185854716489383140024880463872**(1/109)*6
6741943359375**(6/109)/15
N.subs((n,factorint(n,visual=True)) for n in N.atoms(Integer))
2*2**(22/109)*3**(42/109)*5**(90/109)*7**(71/109)/15
Perhaps factorint could be made to accept Expr and do the above? Or perhaps
a function named factorints could replace all ints with their factored
forms.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.