Skip to content

Commit 4118222

Browse files
committed
Update docs
1 parent 819ff2d commit 4118222

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

Diff for: docs/Data/BigInt.md

+17-8
Original file line numberDiff line numberDiff 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

1111
An arbitrary length integer.
@@ -17,7 +17,8 @@ Ord BigInt
1717
Show BigInt
1818
Semiring BigInt
1919
Ring 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.
8485
not :: BigInt -> BigInt
8586
```
8687

87-
Returns a bit inverted number.
88+
Invert the bits.
8889

8990
#### `or`
9091

9192
``` purescript
9293
or :: BigInt -> BigInt -> BigInt
9394
```
9495

95-
Returns a bit or'ed number.
96+
or the bits.
9697

9798
#### `xor`
9899

99100
``` purescript
100101
xor :: BigInt -> BigInt -> BigInt
101102
```
102103

103-
Returns a bit xor'ed numnber.
104+
Exlusive or the bits.
104105

105106
#### `and`
106107

107108
``` purescript
108109
and :: BigInt -> BigInt -> BigInt
109110
```
110111

111-
Returns a bit and'ed number.
112+
and the bits.
112113

113114
#### `shl`
114115

115116
``` purescript
116117
shl :: 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
124125
shr :: 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

166167
A 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

0 commit comments

Comments
 (0)