15,906,645 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 15338211 (Top 5 by date)
Member 15338211
30-Aug-21 8:41am
View
Nice articles! I'm using a bitfield of odd numbers as a moving sieve for prime generation. I didn't think of a compression using a wheel as you did before, but it might be considerably slower due to all the branches.
Member 15338211
28-Aug-21 7:34am
View
Yes, public library under MIT license. There is quite a lot of number-theoretic algorithms that are not to be found implemented efficiently anywhere (with currently available libraries being at least 8x slower than possible). I'm implementing it with usage of assembly and compiler intrinsics for different platforms. I try to avoid allocations whenever possible, so that it can be used on embedded systems without global allocators too.
Member 15338211
28-Aug-21 5:47am
View
Modified Pollard's Rho algorithm with GCD skipping, Brent's cycle finding and Montgomery multiplication + Miller-Rabin deterministic prime 5-test with precomputed magic tables for all 64-bit base 2 SPRP pseudoprimes.
Member 15338211
27-Aug-21 12:20pm
View
@armagedescu I'm aware of that. Still, I want my function to be constexpr. I don't have any problems with implementing it, I just can't decide on the API. The library is not just for me - but for general use, that's why API is important. I strive for it to be safe, easy and intuitive to use.
Member 15338211
27-Aug-21 12:01pm
View
Note: *different* prime factors. Accepting some kind of output_iterator is one of the possibilities - but it requires more from the user of the library, making the call to the function possibly unsafe. What I ask here, is returning the result as 136B stack object something very problematic in any possible context? Should the object be compressed, or values returned in other ways? (And no, I'm not using basic factorization algorithms, so found factors won't be in order by default).