TermInt
type definition:
type TermInt = Term<PInt> & {
readonly addTerm: TermFn<[PInt], PInt>
readonly add: ( other: Term<PInt> ) => TermInt
readonly subTerm: TermFn<[PInt], PInt>
readonly sub: ( other: Term<PInt> ) => TermInt
readonly multTerm: TermFn<[PInt], PInt>
readonly mult: ( other: Term<PInt> ) => TermInt
readonly divTerm: TermFn<[PInt], PInt>
readonly div: ( other: Term<PInt> ) => TermInt
readonly quotTerm: TermFn<[PInt], PInt>
readonly quot: ( other: Term<PInt> ) => TermInt
readonly remainderTerm: TermFn<[PInt], PInt>
readonly remainder: ( other: Term<PInt> ) => TermInt
readonly modTerm: TermFn<[PInt], PInt>
readonly mod: ( other: Term<PInt> ) => TermInt
readonly eqTerm: TermFn<[PInt], PBool>
readonly eq: ( other: Term<PInt> ) => TermBool
readonly ltTerm: TermFn<[PInt], PBool>
readonly lt: ( other: Term<PInt> ) => TermBool
readonly ltEqTerm: TermFn<[PInt], PBool>
readonly ltEq: ( other: Term<PInt> ) => TermBool
readonly gtTerm: TermFn<[PInt], PBool>
readonly gt: ( other: Term<PInt> ) => TermBool
readonly gtEqTerm: TermFn<[PInt], PBool>
readonly gtEq: ( other: Term<PInt> ) => TermBool
};
add
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
padd.$( term ).$( other )
adds other to the term is defined on and returns the result
sub
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
psub.$( term ).$( other )
subtracts other to the term is defined on and returns the result
mult
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
pmult.$( term ).$( other )
multiplies other to the term is defined on and returns the result
div
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
pdiv.$( term ).$( other )
performs integer division using the term is defined on and other as divisor; returns the result rounded towards negative infinity:
exaxmple:
pInt( -20 ).div( pInt( -3 ) ) // == -7
quot
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
pquot.$( term ).$( other )
performs integer division using the term is defined on and other as divisor; returns the quotient rounded towards zero:
exaxmple:
pInt( -20 ).quot( pInt( 3 ) ) // == -6
remainder
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
prem.$( term ).$( other )
performs integer division using the term is defined on and other as divisor; returns the remainder:
exaxmple:
pInt( -20 ).remainder( pInt( 3 ) ) // == -2
mod
parameter:
othertype:Term<PInt>returns
TermIntequivalent expression:
pmod.$( term ).$( other )
returns the term the method is defined on, in modulo other.
exaxmple:
pInt( -20 ).mod( pInt( 3 ) ) // == 1
eq
parameter:
othertype:Term<PInt>returns:
TermBoolequivalent expression:
peqInt.$( term ).$( other )
integer equality
lt
parameter:
othertype:Term<PInt>returns:
TermBoolequivalent expression:
plessInt.$( term ).$( other )
returns pBool( true ) if term is strictly less than other; pBool( false ) otherwise
ltEq
parameter:
othertype:Term<PInt>returns:
TermBoolequivalent expression:
plessEqInt.$( term ).$( other )
returns pBool( true ) if term is less or equal to other; pBool( false ) otherwise
gt
parameter:
othertype:Term<PInt>returns:
TermBoolequivalent expression:
pgreaterInt.$( term ).$( other )
returns pBool( true ) if term is strictly greater than other; pBool( false ) otherwise
gtEq
parameter:
othertype:Term<PInt>returns:
TermBoolequivalent expression:
pgreaterEqInt.$( term ).$( other )
returns pBool( true ) if term is greater or equal to other; pBool( false ) otherwise