bigint

Provides arbitrary precision integer support.

Summary
bigintProvides arbitrary precision integer support.
Types
BigIntAn arbitrary precision integer type.
Constants
ZeroThe integer zero (0) as a BigInt.
OneThe integer one (1) as a BigInt.
TwoThe integer two (2) as a BigInt.
Functions
makeMake a BigInt from a Number.
makeFromStringMake a BigInt from a string.
addAdd two BigInt values and return the result.
subSubtract two BigInt values and return the result.
mulMultiply two BigInt values and return the result.
absReturn the absolute value of a BigInt value.
negReturn the negation of a BigInt value.
lessDetermine whether one BigInt value is less than another.
equalsReturns TRUE if x = y.
BigInt.add
BigInt.equals
BigInt.mul
BigInt.sub
BigInt.toString

Types

BigInt

An arbitrary precision integer type.  This is an opaque type and users are not expected to poke around inside it.

Constants

Zero

The integer zero (0) as a BigInt.

One

The integer one (1) as a BigInt.

Two

The integer two (2) as a BigInt.

Functions

make

FUNCTION make(x: Number): BigInt

Make a BigInt from a Number.

Parameters

xnumber to make into a BigInt

Returns

The value of x as a BigInt.

Description

This function discards any fractional part of the input value.

makeFromString

FUNCTION makeFromString(s: String): BigInt

Make a BigInt from a string.

Parameters

sstring to make into a BigInt

Returns

The value of s as a BigInt.

Description

This function expects that the string contains only decimal digits, optionally preceded by a minus sign (-).

add

FUNCTION add( x,
y: BigInt): BigInt

Add two BigInt values and return the result.

sub

FUNCTION sub( x,
y: BigInt): BigInt

Subtract two BigInt values and return the result.

mul

FUNCTION mul( x,
y: BigInt): BigInt

Multiply two BigInt values and return the result.

abs

FUNCTION abs(x: BigInt): BigInt

Return the absolute value of a BigInt value.

neg

FUNCTION neg(x: BigInt): BigInt

Return the negation of a BigInt value.

less

FUNCTION less( x,
y: BigInt): Boolean

Determine whether one BigInt value is less than another.  Returns TRUE if x < y.

equals

FUNCTION equals( x,
y: BigInt): Boolean

Returns TRUE if x = y.

BigInt.add

FUNCTION BigInt.add( self,
x: BigInt): BigInt

BigInt.equals

FUNCTION BigInt.equals( self,
x: BigInt): Boolean

BigInt.mul

FUNCTION BigInt.mul( self,
x: BigInt): BigInt

BigInt.sub

FUNCTION BigInt.sub( self,
x: BigInt): BigInt

BigInt.toString

FUNCTION BigInt.toString(self: BigInt): String
FUNCTION make(x: Number): BigInt
Make a BigInt from a Number.
FUNCTION makeFromString(s: String): BigInt
Make a BigInt from a string.
FUNCTION add( x,
y: BigInt): BigInt
Add two BigInt values and return the result.
FUNCTION sub( x,
y: BigInt): BigInt
Subtract two BigInt values and return the result.
FUNCTION mul( x,
y: BigInt): BigInt
Multiply two BigInt values and return the result.
FUNCTION abs(x: BigInt): BigInt
Return the absolute value of a BigInt value.
FUNCTION neg(x: BigInt): BigInt
Return the negation of a BigInt value.
FUNCTION less( x,
y: BigInt): Boolean
Determine whether one BigInt value is less than another.
FUNCTION equals( x,
y: BigInt): Boolean
Returns TRUE if x = y.
FUNCTION BigInt.add( self,
x: BigInt): BigInt
FUNCTION BigInt.equals( self,
x: BigInt): Boolean
FUNCTION BigInt.mul( self,
x: BigInt): BigInt
FUNCTION BigInt.sub( self,
x: BigInt): BigInt
FUNCTION BigInt.toString(self: BigInt): String
Close