nth root

Tim Roberts t.roberts at cqu.edu.au
Sun Feb 1 00:36:43 EST 2009


Actually, all I'm interested in is whether the 100 digit numbers have an exact integral root, or not.  At the moment, because of accuracy concerns, I'm doing something like
 
                    for root in powersp:
                            nroot = round(bignum**(1.0/root))
                            if bignum==long(nroot)**root:
                                                             .........
which is probably very inefficient, but I can't see anything better.....
 
Tim
 
 



More information about the Python-list mailing list