UNPKG

maths.ts

Version:

Math utilities library for TypeScript, JavaScript and Node.js

8 lines (7 loc) 295 B
/** * Emulates the PRIMES of Eratosthenes algorithm for finding all prime * numbers up to a given limit. * @param max The last number this algorithm will reach. * @return An array with all prime numbers from 0 to max. */ export declare function sieveOfEratosthenes(max?: number): number[];