Skip to content

purescript-contrib/purescript-bigints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purescript-bigints

A library for calculations with arbitrary length integers. This is a simple wrapper around BigInteger.js by Peter Olson.

Example

x = fromInt 42
y = (fromJust <<< fromBase 16) "fe45aab12"
mersenne10 = (fromInt 2) `pow` (fromInt 89) - one

> x `pow` x
fromString "150130937545296572356771972164254457814047970568738777235893533016064"

> toNumber (y * mersenne10)
4.2248205181941055e+37

> prime mersenne10
true

Module documentation

Installation

npm install
bower install
gulp

About

Arbitrary length integers for PureScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 15