Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Dec 22, 2017
1 parent 819ff2d commit 4118222
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions docs/Data/BigInt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This module defines a `BigInt` data type for arbitrary length integers.
#### `BigInt`

``` purescript
data BigInt :: *
data BigInt :: Type
```

An arbitrary length integer.
Expand All @@ -17,7 +17,8 @@ Ord BigInt
Show BigInt
Semiring BigInt
Ring BigInt
ModuloSemiring BigInt
CommutativeRing BigInt
EuclideanRing BigInt
```

#### `fromInt`
Expand Down Expand Up @@ -84,47 +85,47 @@ Returns `true` if the number is prime, `false` otherwise.
not :: BigInt -> BigInt
```

Returns a bit inverted number.
Invert the bits.

#### `or`

``` purescript
or :: BigInt -> BigInt -> BigInt
```

Returns a bit or'ed number.
or the bits.

#### `xor`

``` purescript
xor :: BigInt -> BigInt -> BigInt
```

Returns a bit xor'ed numnber.
Exlusive or the bits.

#### `and`

``` purescript
and :: BigInt -> BigInt -> BigInt
```

Returns a bit and'ed number.
and the bits.

#### `shl`

``` purescript
shl :: BigInt -> Number -> BigInt
```

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.
shift the bits left and zero fill.

#### `shr`

``` purescript
shr :: BigInt -> Number -> BigInt
```

Shift the first number to the left by the second number of bits and return the result.
Shift the bits right and maintain pos/neg.

#### `fromString`

Expand Down Expand Up @@ -165,4 +166,12 @@ toString :: BigInt -> String

A decimal representation of the `BigInt` as a `String`.

#### `toBase`

``` purescript
toBase :: Int -> BigInt -> String
```

A base N representation of the `BigInt` as a `String`.


0 comments on commit 4118222

Please sign in to comment.