UNPKG
miller-rabin
Version:
latest (4.0.1)
4.0.1
4.0.0
3.0.0
2.0.1
2.0.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
Miller Rabin algorithm for primality test
github.com/indutny/miller-rabin
indutny/miller-rabin
miller-rabin
/
1.js
8 lines
(4 loc)
•
151 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
'use strict'
;
const
BN
=
require
(
'bn.js'
);
const
p =
new
BN
(
'2e1b162f326430f5ac6af10f96b2a8350e01675d22324c9f'
,
'hex'
);
console
.
log
(p.
bitLength
());