Giter Site home page Giter Site logo

taeh98 / prime-numbers Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6 KB

A program to print/save (to a text file) all prime numbers or the next prime number after a given input start number.

Java 100.00%
prime-numbers primes maths java java-8 java8 biginteger bignumber bigdecimal bigdecimal-utils

prime-numbers's Introduction

This project is a program which will print or save (to a text file) all prime numbers in order, or the next prime number after a given input number. I am trying to do this as efficiently as possible (in Java in this repo - I might move to another, more efficient language in another repo to absolutely optimise efficiency). To run the program, all you need to do is download the repo, then compile all Java source files. Run the compiled PrimeNumbers class in a CLI and follow instructions there. If you can see any ways of improving efficiency, flag it in an issue or feel free to just fork then submit a pull of the fix.

prime-numbers's People

Stargazers

 avatar

Watchers

 avatar

prime-numbers's Issues

Add printing

Still need to add printing output to a text file (definitely for printing all prime numbers - maybe next after given start point too?).

Process will probably be: clearing output file, putting run timestamp and IP when starting, then just appending file at same time as (or not) printing to CLI, then opening file once done.

Efficiency and implementing stuff

I need to try to find a way of finding prime numbers efficiently using the current mathematical methods and operations in my Java source file and any other new ones I can find and implement - especially for a new third mode, finding any prime number after (greater) a given number input.

Todo:

  • enable saving the output to a file along with or in place of printing
  • implement this new third mode with maximum efficiency for current methods implemented
  • alter existing ones to maximise efficiency (minimise the time taken)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.