File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This module defines a `BigInt` data type for arbitrary length integers.
55#### ` BigInt `
66
77``` purescript
8- data BigInt :: *
8+ data BigInt :: Type
99```
1010
1111An arbitrary length integer.
@@ -17,7 +17,8 @@ Ord BigInt
1717Show BigInt
1818Semiring BigInt
1919Ring BigInt
20- ModuloSemiring BigInt
20+ CommutativeRing BigInt
21+ EuclideanRing BigInt
2122```
2223
2324#### ` fromInt `
@@ -84,47 +85,47 @@ Returns `true` if the number is prime, `false` otherwise.
8485not :: BigInt -> BigInt
8586```
8687
87- Returns a bit inverted number .
88+ Invert the bits .
8889
8990#### ` or `
9091
9192``` purescript
9293or :: BigInt -> BigInt -> BigInt
9394```
9495
95- Returns a bit or'ed number .
96+ or the bits .
9697
9798#### ` xor `
9899
99100``` purescript
100101xor :: BigInt -> BigInt -> BigInt
101102```
102103
103- Returns a bit xor'ed numnber .
104+ Exlusive or the bits .
104105
105106#### ` and `
106107
107108``` purescript
108109and :: BigInt -> BigInt -> BigInt
109110```
110111
111- Returns a bit and'ed number .
112+ and the bits .
112113
113114#### ` shl `
114115
115116``` purescript
116117shl :: BigInt -> Number -> BigInt
117118```
118119
119- Shift the first number to the right by the second number of bits and return the result. Shifts in ones if the first number is negative .
120+ shift the bits left and zero fill .
120121
121122#### ` shr `
122123
123124``` purescript
124125shr :: BigInt -> Number -> BigInt
125126```
126127
127- Shift the first number to the left by the second number of bits and return the result .
128+ Shift the bits right and maintain pos/neg .
128129
129130#### ` fromString `
130131
@@ -165,4 +166,12 @@ toString :: BigInt -> String
165166
166167A decimal representation of the ` BigInt ` as a ` String ` .
167168
169+ #### ` toBase `
170+
171+ ``` purescript
172+ toBase :: Int -> BigInt -> String
173+ ```
174+
175+ A base N representation of the ` BigInt ` as a ` String ` .
176+
168177
You can’t perform that action at this time.
0 commit comments