# nodejs-prho

> Pollard's rho algorithm implemented in Node.js with long arithmetics

Latest version **1.0.2** (published 2021-05-19) · GPLv3 license · 0 weekly downloads

## Install

```sh
npm install nodejs-prho
pnpm add nodejs-prho
yarn add nodejs-prho
bun add nodejs-prho
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-05-19 |
| First published | 2021-05-19 |
| Weekly downloads | 0 |
| License | GPLv3 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.4.0 |
| Dependencies | 0 |
| Unpacked size | 38 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Oleksandr Danylchenko |
| Maintainers | olexander_d |
| Keywords | gcd, prho, prime factorization, pollard rho algorithm |

## Links

- npm: https://www.npmjs.com/package/nodejs-prho
- Repository: https://github.com/OleksandrDanylchenko/nodejs-prho
- Homepage: https://github.com/OleksandrDanylchenko/nodejs-prho#readme
- Issues: https://github.com/OleksandrDanylchenko/nodejs-prho/issues
- npm.io page: https://npm.io/package/nodejs-prho

## Recent versions

- 1.0.2 (latest) — 2021-05-19

## README

# nodejs-prho
Pollard's rho algorithm implemented in Node.js

## Documentation
Wiki - https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm

## Inspiration
Codepen - https://codepen.io/michaelsknobloch/pen/Kzqeyb

## Reasoning
Solved infinite loops, which can happen on some numbers in https://www.npmjs.com/package/prho package, with recursive approach from https://codepen.io/michaelsknobloch/pen/Kzqeyb and usage of different functions to find factors to prevent stucking. Also it support long arithmetics with native [BigInt](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/BigInt) JS object.

## Installation
```console
$ npm install prho
```
```console
$ yarn add nodejs-prho
```

## Usage
```js
const prho = require('nodejs-prho')
const factors = prho(420n)
// => [2 , 2 , 3 , 5 , 7]
```

---
_Source: https://npm.io/package/nodejs-prho · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
