UInt16 overview
Added in v1.0.0
Table of contents
Constructor
fromNumber
Attempts to construct a [[UInt16]] from a number, computing none if the number is not an integer in the bounds of UInt16, otherwise some(n).
Signature
export declare function fromNumber(n: number): option.Option<UInt16>
Added in v1.0.0
fromNumberLossy
Constructs a [[UInt16]] from a number, wrapping the value if it overflows the range of [[UInt16]].
Signature
export declare function fromNumberLossy(n: number): UInt16
Added in v1.0.0
of
Constructs a UInt16 from [[Digits]]
Signature
export declare function of(zero: 0): UInt16
export declare function of(...digits: Digits): NonZero<UInt16>
Added in v1.0.0
unsafeFromNumber
Attempts to construct a [[UInt16]] from a number, throwing a RangeError if the number is not an integer in the bounds of UInt16.
Signature
export declare function unsafeFromNumber(n: number): UInt16
Added in v1.0.0
Data Type
UInt16 (interface)
Signature
export interface UInt16 extends Branded<UInt32, typeof U_INT_16> {}
Added in v1.0.0
Typeclass Instance
CommutativeRing
Signature
export declare const CommutativeRing: CommutativeRing<UInt16>
Added in v1.0.0
Enum
Signature
export declare const Enum: {
equals: typeof equals
compare: (x: UInt16, y: UInt16) => Ordering
next: typeof next
prev: typeof prev
}
Added in v1.0.0
EuclideanRing
Signature
export declare const EuclideanRing: EuclideanRing<UInt16>
Added in v1.0.0
HasPow
Signature
export declare const HasPow: HasPow<UInt16>
Added in v1.0.0
HasToInt
Signature
export declare const HasToInt: HasToInt<UInt16>
Added in v1.0.0
HasToRational
Signature
export declare const HasToRational: HasToRational<UInt16>
Added in v1.0.0
Numeric
Signature
export declare const Numeric: Numeric<UInt16>
Added in v1.0.0
Ring
Signature
export declare const Ring: Ring<UInt16>
Added in v1.0.0
Semiring
Signature
export declare const Semiring: Semiring<UInt16>
Added in v1.0.0
utils
Digits (type alias)
A tuple of literal integers representing every valid sequence of digits for [[UInt16]]
Signature
export type Digits =
| [0]
| [LeadingDigit]
| [LeadingDigit, Digit]
| [LeadingDigit, Digit, Digit]
| [LeadingDigit, Digit, Digit, Digit]
| [0 | 1 | 2 | 3 | 4 | 5, Digit, Digit, Digit, Digit]
| [6, 0 | 1 | 2 | 3 | 4, Digit, Digit, Digit]
| [6, 5, 0 | 1 | 2 | 3 | 4, Digit, Digit]
| [6, 5, 5, 0 | 1 | 2, Digit]
| [6, 5, 5, 3, 0 | 1 | 2 | 3 | 4 | 5]
Added in v1.0.0
UInt16
Signature
export declare const UInt16: Bounded<UInt16> &
CommutativeRing<UInt16> &
Enum<UInt16> &
Eq<UInt16> &
EuclideanRing<UInt16> &
HasPow<UInt16> &
HasToInt<UInt16> &
HasToRational<UInt16> &
Integral<UInt16> &
Numeric<UInt16> &
Ord<UInt16> &
Ring<UInt16> &
Semiring<UInt16> &
Show<UInt16> & {
add: typeof add
bottom: UInt16
compare: (x: UInt16, y: UInt16) => Ordering
div: typeof div
equals: typeof equals
fromInt: typeof fromInt
fromNumber: typeof fromNumber
fromNumberLossy: typeof fromNumberLossy
isTypeOf: typeof isTypeOf
mod: typeof mod
mul: typeof mul
negate: typeof negate
next: typeof next
of: typeof of
one: UInt16
pow: typeof pow
prev: typeof prev
quot: typeof quot
rem: typeof rem
sub: typeof sub
toInt: typeof toInt
toNonNegativeNumber: typeof toNumber
toNumber: typeof toNumber
top: UInt16
toRational: typeof toRational
unsafeFromNumber: typeof unsafeFromNumber
zero: UInt16
}
Added in v1.0.0
add
Signature
export declare function add(a: UInt16, b: UInt16): UInt16
Added in v1.0.0
bottom
Signature
export declare const bottom: UInt16
Added in v1.0.0
compare
Signature
export declare const compare: (x: UInt16, y: UInt16) => Ordering
Added in v1.0.0
degree
Signature
export declare function degree(i: UInt16): Natural
Added in v1.0.0
div
Signature
export declare function div(n: UInt16, d: NonZero<UInt16>): UInt16
Added in v1.0.0
equals
Signature
export declare function equals(a: UInt16, b: UInt16): boolean
Added in v1.0.0
fromInt
Signature
export declare function fromInt(int: Int): Option<UInt16>
Added in v1.0.0
isTypeOf
Signature
export declare function isTypeOf(x: unknown): x is UInt16
Added in v1.0.0
mod
Signature
export declare function mod(n: UInt16, d: NonZero<UInt16>): UInt16
Added in v1.0.0
mul
Signature
export declare function mul(a: UInt16, b: UInt16): UInt16
Added in v1.0.0
negate
Signature
export declare function negate(a: UInt16): UInt16
Added in v1.0.0
next
Signature
export declare function next(a: UInt16): Option<UInt16>
Added in v1.0.0
one
Signature
export declare const one: UInt16
Added in v1.0.0
pow
Signature
export declare function pow(n: UInt16, exp: UInt16): UInt16
Added in v1.0.0
prev
Signature
export declare function prev(a: UInt16): Option<UInt16>
Added in v1.0.0
quot
Signature
export declare function quot(a: UInt16, b: NonZero<UInt16>): UInt16
Added in v1.0.0
rem
Signature
export declare function rem(a: UInt16, b: NonZero<UInt16>): UInt16
Added in v1.0.0
sub
Signature
export declare function sub(a: UInt16, b: UInt16): UInt16
Added in v1.0.0
toInt
Signature
export declare function toInt(n: UInt16): Int
Added in v1.0.0
toNumber
Signature
export declare function toNumber(i: UInt16): NonNegative<number>
Added in v1.0.0
toRational
Signature
export declare function toRational(a: UInt16): Rational
Added in v1.0.0
top
Signature
export declare const top: UInt16
Added in v1.0.0
zero
Signature
export declare const zero: UInt16
Added in v1.0.0