File tree 1 file changed +17
-8
lines changed
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.
5
5
#### ` BigInt `
6
6
7
7
``` purescript
8
- data BigInt :: *
8
+ data BigInt :: Type
9
9
```
10
10
11
11
An arbitrary length integer.
@@ -17,7 +17,8 @@ Ord BigInt
17
17
Show BigInt
18
18
Semiring BigInt
19
19
Ring BigInt
20
- ModuloSemiring BigInt
20
+ CommutativeRing BigInt
21
+ EuclideanRing BigInt
21
22
```
22
23
23
24
#### ` fromInt `
@@ -84,47 +85,47 @@ Returns `true` if the number is prime, `false` otherwise.
84
85
not :: BigInt -> BigInt
85
86
```
86
87
87
- Returns a bit inverted number .
88
+ Invert the bits .
88
89
89
90
#### ` or `
90
91
91
92
``` purescript
92
93
or :: BigInt -> BigInt -> BigInt
93
94
```
94
95
95
- Returns a bit or'ed number .
96
+ or the bits .
96
97
97
98
#### ` xor `
98
99
99
100
``` purescript
100
101
xor :: BigInt -> BigInt -> BigInt
101
102
```
102
103
103
- Returns a bit xor'ed numnber .
104
+ Exlusive or the bits .
104
105
105
106
#### ` and `
106
107
107
108
``` purescript
108
109
and :: BigInt -> BigInt -> BigInt
109
110
```
110
111
111
- Returns a bit and'ed number .
112
+ and the bits .
112
113
113
114
#### ` shl `
114
115
115
116
``` purescript
116
117
shl :: BigInt -> Number -> BigInt
117
118
```
118
119
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 .
120
121
121
122
#### ` shr `
122
123
123
124
``` purescript
124
125
shr :: BigInt -> Number -> BigInt
125
126
```
126
127
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 .
128
129
129
130
#### ` fromString `
130
131
@@ -165,4 +166,12 @@ toString :: BigInt -> String
165
166
166
167
A decimal representation of the ` BigInt ` as a ` String ` .
167
168
169
+ #### ` toBase `
170
+
171
+ ``` purescript
172
+ toBase :: Int -> BigInt -> String
173
+ ```
174
+
175
+ A base N representation of the ` BigInt ` as a ` String ` .
176
+
168
177
You can’t perform that action at this time.
0 commit comments