Socket
Book a DemoInstallSign in
Socket

continuedfractionfactorization

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

continuedfractionfactorization

continued fraction factorization method for integers

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

continuedFractionFactorization

Continued Fraction Factorization (https://en.wikipedia.org/wiki/Continued_fraction_factorization) in JavaScript using native BigInt

There is description at https://trizenx.blogspot.com/2018/10/continued-fraction-factorization-method.html . See also links in the code.

Example

import factorize from './continuedFractionFactorization.js';
console.time();
const f = factorize(2n**128n + 1n);
console.timeEnd();
// ~13 seconds
console.assert(f === 5704689200685129054721n || f === 59649589127497217n, f);

Keywords

bigint

FAQs

Package last updated on 14 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts