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 rhettinger
Recipients PedanticHacker, Stefan Pochmann, mark.dickinson, mcognetta, pablogsal, rhettinger, serhiy.storchaka, tim.peters
Date 2021-12-21.19:52:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>  Finv = [pow(fodd, -1, 2**64) for fodd in Fodd]

This is a good trick.  I had already experimented with separating factorials into an odd component and a shift count, but failed to get a speed-up because the divisions were slow.  Having a table of multiplicative inverses and working mod 2**64 bypasses that problem nicely.  Division-free is the way to go :-)
Date User Action Args
2021-12-21 19:52:18rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson, serhiy.storchaka, PedanticHacker, mcognetta, Stefan Pochmann, pablogsal
2021-12-21 19:52:18rhettingersetmessageid: <>
2021-12-21 19:52:18rhettingerlinkissue37295 messages
2021-12-21 19:52:17rhettingercreate