Giter VIP home page Giter VIP logo

sieve-set's Introduction

sieve-set

NPM Version

Generate a Sieve of Eratosthenes with constant time lookup. For testing primes in constant time, see quick-is-prime.

Install

$ npm install sieve-set
var sieveSet = require('sieve-set');

Usage

console.log(sieveSet(100));
{ '2': true,
  '3': true,
  '5': true,
  '7': true,
  '11': true,
  '13': true,
  '17': true,
  '19': true,
  '23': true,
  '29': true,
  '31': true,
  '37': true,
  '41': true,
  '43': true,
  '47': true,
  '53': true,
  '59': true,
  '61': true,
  '67': true,
  '71': true,
  '73': true,
  '79': true,
  '83': true,
  '89': true,
  '97': true }

sieve-set's People

Contributors

dsernst avatar

Watchers

James Cloos avatar  avatar

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.