UNPKG

primejs

Version:

A library for prime number miscellany

12 lines (10 loc) 378 B
var should = require('chai').should(), math = require('mathjs'), Primes = require('../index'); describe('#Legendre', function() { it('prime count for 10^21', function() { var count = Primes.PrimeCounting.Legendre("1000000000000000000000"); count = math.format(count, {notation: 'fixed', precision: 1}); count.should.equal("21117412262909985552.3"); }); });