Skip to content

Commit

Permalink
Merge pull request #222 from KimioN42/main
Browse files Browse the repository at this point in the history
Added Rebol and Portuguese languages
  • Loading branch information
mawerty authored Jan 13, 2024
2 parents 5856058 + 0068f97 commit db9a5dd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Is Prime

Welcome to the GitHub repository of an efficient algorithm that determines whether or not a given number is prime, with 95% accuracy in constant time (O(1)). Prime numbers have always been an interesting topic in the field of mathematics and computer science, and detecting them with high accuracy and efficiency is a challenge that has been tackled by many researchers. This algorithm uses the fact that most of the numbers are not prime, to detect a prime number.

## NPM Package

If you are too lazy to implement this complex algorithm in your JS project, you can use our npm package! https://www.npmjs.com/package/is-prime-fast

## Contributing

If you want to help with this project, you can make a pull request with an implementation for a language that hasn't been added before, or at least give it a star.

### Guidelines

If it's possible, name your functions and variables `is_prime`. For the main parent class in OO languages, you should also name it `is_prime`. The file itself should be named `main.file_extension`. Also, when you add an implemention for some new language, do remember to create an optimized version of your code and add the new language to the list at the bottom section of the README.

## FAQ

Q: Is this project serious?<br />
A: Yes, this is a 100% serious project.

Expand All @@ -21,6 +26,7 @@ Q: How does the optimized implementation work?<br />
A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.

## The algorithm has been implemented in the following languages:

- Ada
- Apex
- APL
Expand Down Expand Up @@ -120,6 +126,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- PureScript
- Piet
- PL/SQL
- Portuguese
- PostgreSQL
- Powershell
- Processing
Expand All @@ -129,6 +136,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- Q#
- R
- Racket
- Rebol
- Rockstar
- Romanian
- Ruby
Expand Down
1 change: 1 addition & 0 deletions implementations/main.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Não
3 changes: 3 additions & 0 deletions implementations/main.reb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
is-prime: func [n] [
false
]
1 change: 1 addition & 0 deletions optimized_implementations/main.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Não
1 change: 1 addition & 0 deletions optimized_implementations/main.reb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
is-prime:func[n][false]

0 comments on commit db9a5dd

Please sign in to comment.