Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integer factiorization function somewhere in Haskell library? [closed]

I find some library with implementation of integer factorization function. Preferably some fast implementation in some popular library, to not reinvent the wheel.

Is there some ?

like image 605
s9gf4ult Avatar asked Feb 22 '13 11:02

s9gf4ult


2 Answers

A quick google search shows arithmoi package by Daniel Fischer.

like image 82
Satvik Avatar answered Sep 25 '22 12:09

Satvik


See primeFactors in primes. It's reasonably fast, for example it factors 104729 * 104723 instantly.

like image 37
Petr Avatar answered Sep 26 '22 12:09

Petr