Table of contents
- NonZeroInteger (interface)
- add (constant)
- div (constant)
- isPositive (constant)
- mul (constant)
- negate (constant)
- one (constant)
- ord (constant)
- setoid (constant)
- show (constant)
- sign (constant)
- unwrap (constant)
- abs (function)
- fromInteger (function)
- gcd (function)
- lcm (function)
- sub (function)
- wrap (function)
NonZeroInteger (interface)
A NonZeroInteger is also an Integer
Signature
export interface NonZeroInteger
extends Newtype<
{
Integer: true
NonZero: true
},
BigInteger
> {}
add (constant)
Signature
export const add: (x: NonZeroInteger, y: NonZeroInteger) => NonZeroInteger = ...
div (constant)
Signature
export const div: (x: NonZeroInteger, y: NonZeroInteger) => NonZeroInteger = ...
isPositive (constant)
Signature
export const isPositive: (x: NonZeroInteger) => boolean = ...
mul (constant)
Signature
export const mul: (x: NonZeroInteger, y: NonZeroInteger) => NonZeroInteger = ...
negate (constant)
Signature
export const negate: (x: NonZeroInteger) => NonZeroInteger = ...
one (constant)
Signature
export const one: NonZeroInteger = ...
ord (constant)
Signature
export const ord: Ord<NonZeroInteger> = ...
setoid (constant)
Signature
export const setoid: Setoid<NonZeroInteger> = ...
show (constant)
Signature
export const show: (x: NonZeroInteger) => string = ...
sign (constant)
Signature
export const sign: (x: NonZeroInteger) => -1 | 1 = ...
unwrap (constant)
Signature
export const unwrap: (x: NonZeroInteger) => BigInteger = ...
abs (function)
Signature
export function abs(x: NonZeroInteger): Natural { ... }
fromInteger (function)
Signature
export function fromInteger(i: Integer): Option<NonZeroInteger> { ... }
gcd (function)
Signature
export function gcd(x: Integer, y: NonZeroInteger): Natural { ... }
lcm (function)
Signature
export function lcm(x: NonZeroInteger, y: NonZeroInteger): Natural { ... }
sub (function)
Signature
export function sub(x: NonZeroInteger, y: NonZeroInteger): Option<NonZeroInteger> { ... }
wrap (function)
Signature
export function wrap(x: BigInteger): Option<NonZeroInteger> { ... }