This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, serhiy.storchaka
Date 2019-05-11.14:33:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557585201.27.0.831229876849.issue36887@roundup.psfhosted.org>
In-reply-to
Content
> I am wondering whether int(sqrt(float(n))) can be used as a good initial approximation.

It can, but I'd prefer to avoid floating-point arithmetic (we don't have any guarantees about the accuracy of sqrt, so you'd always need a check and a fallback for the case where sqrt isn't accurate enough), and there are other purely-integer-based ways to produce a fast initial approximation. I do have some plans to add optimizations, but wanted to get the basic algorithm in first.
History
Date User Action Args
2019-05-11 14:33:21mark.dickinsonsetrecipients: + mark.dickinson, serhiy.storchaka
2019-05-11 14:33:21mark.dickinsonsetmessageid: <1557585201.27.0.831229876849.issue36887@roundup.psfhosted.org>
2019-05-11 14:33:21mark.dickinsonlinkissue36887 messages
2019-05-11 14:33:21mark.dickinsoncreate