Skip to content

O(1) Algorithm to check if number is prime that works in 100% cases

License

Notifications You must be signed in to change notification settings

mawerty/is-prime-100

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Is-Prime-100: A Revolutionary O(1) Algorithm for Prime Detection

Welcome to the GitHub repository for Is-Prime-100 the great successor of Is-Prime, an innovative algorithm designed to determine whether a number is prime with 100% accuracy for integers(For technical reasons current inplementation supports only numbers from 1 to 500 000, but it can be expaned!). This algorithm represents a groundbreaking approach to primality testing, harnessing advanced techniques and complex condition checks to achieve its results. Overview

Prime numbers have long intrigued mathematicians and computer scientists alike. With Is-Prime-100, we introduce a novel method that operates in constant time (O(1)), delivering flawless results through intricate and sophisticated logic.

Key Features

Unmatched Accuracy: Guarantees 100% accuracy. Constant Time Complexity: Achieves rapid results by employing an advanced technique that circumvents traditional computational bottlenecks. Sophisticated Logic: Utilizes a highly detailed set of conditions to ensure comprehensive coverage.

Performance

While this algorithm excels in accuracy, it is important to note that it is not the most optimized solution available. For those seeking the most efficient prime-checking algorithms, we recommend exploring Is-Prime, which delivers approximately 95% accuracy with superior performance in real-life scenarios.

NPM Package

Unfortunately this implementation isn't avaible as npm package, but you may be interested in checking out the npm package of heuristic version, which is almost as good as this one!

Contributing

We welcome contributions to enhance and extend this project. If you have ideas for optimizations, additional implementations in different languages, or improvements to the current approach, please submit a pull request or give the project a star to show your support.

Guidelines

Function and Variable Naming: Adhere to naming conventions by using is_prime for functions and variables. File Naming: The main file should be named main.extention. New Language Implementations: If you see that implementation in any of the languages is suboptimal, or want to contribute to this great project, by rewriting it in new language, feel free to!

FAQ

Q: Is this project serious? A: Absolutely. This project is a serious exploration into innovative prime detection methodologies.

Q: How does the algorithm ensure 100% accuracy? A: The algorithm employs a comprehensive set of conditions designed to verify primality with complete certainty for the specified range.

Q: What if I need a more performance-oriented solution? A: For high-performance needs, consider the Is-Prime heuristic implementation, which offers a high-performance alternative with approximately 95% accuracy.

Q: What if I need to check whether number is prime in my next-gen javascript project? A: Unfortunately this implementation isn't avaible as npm package, but you may be interested in checking out the npm package of heuristic version, which is almost as good as this one!

Thank you for your interest in Is-Prime-100. We look forward to your contributions and feedback!

About

O(1) Algorithm to check if number is prime that works in 100% cases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages