A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mongodb.github.io/node-mongodb-native/3.6/api/Long.html below:

Class: Long

Node.js MongoDB Driver API Class: Long Long
new Long(low, high){Long} node_modules/bson/lib/bson/long.js

,

line 43

Defines a Long class for representing a 64-bit two's-complement
integer value, which faithfully simulates the behavior of a Java "Long". This
implementation is derived from LongLib in GWT.

Constructs a 64-bit two's-complement integer, given its low and high 32-bit
values as signed integers. See the from* functions below for more
convenient ways of constructing Longs.

The internal representation of a Long is the two given signed, 32-bit values.
We use 32-bit pieces because these are the size of integers on which
Javascript performs bit-operations. For operations like addition and
multiplication, we split each number into 16-bit pieces, which can easily be
multiplied within Javascript's floating-point representation without overflow
or change in sign.

In the algorithms below, we frequently reduce the negative case to the
positive case by negating the input(s) and then post-processing the result.
Note that we must ALWAYS check specially whether those values are MIN_VALUE
(-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
a positive number, it overflows back into a negative). Not handling this
case would often result in infinite recursion.

Name Type Description low number

the low (signed) 32 bits of the Long.

high number

the high (signed) 32 bits of the Long.

Members
staticLong.MAX_VALUELong
staticLong.MIN_VALUELong
staticLong.NEG_ONELong
staticLong.ONELong
staticLong.ZEROLong
Methods
staticLong.fromBigInt(value){Long} node_modules/bson/lib/bson/long.js

,

line 724

Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

Name Type Description value bigint

The number in question

Returns: corresponding Long value
staticLong.fromBits(lowBits, highBits){Long} node_modules/bson/lib/bson/long.js

,

line 736

Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.

Name Type Description lowBits number

the low 32-bits.

highBits number

the high 32-bits.

Returns: corresponding Long value.
staticLong.fromInt(value){Long} node_modules/bson/lib/bson/long.js

,

line 683

Returns a Long representing the given (32-bit) integer value.

Name Type Description value number

the 32-bit integer in question.

Returns: corresponding Long value.
staticLong.fromNumber(value){Long} node_modules/bson/lib/bson/long.js

,

line 705

Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

Name Type Description value number

the number in question.

Returns: corresponding Long value.
staticLong.fromString(str, opt_radix){Long} node_modules/bson/lib/bson/long.js

,

line 748

Returns a Long representation of the given string, written using the given radix.

Name Type Description str string

the textual representation of the Long.

opt_radix number

the radix in which the text is written.

Returns: corresponding Long value.
add(other){Long} node_modules/bson/lib/bson/long.js

,

line 349

Returns the sum of this and the given Long.

Name Type Description other Long

Long to add to this one.

Returns: sum of this and the given Long.
and(other){Long} node_modules/bson/lib/bson/long.js

,

line 582

Returns the bitwise-AND of this Long and the given one.

Name Type Description other Long

the Long with which to AND.

Returns: bitwise-AND of this and the other.
compare(other){boolean} node_modules/bson/lib/bson/long.js

,

line 306

Compares this Long with the given one.

Name Type Description other Long

Long to compare against.

Returns: if they are the same, 1 if the this is greater, and -1 if the given one is greater.
div(other){Long} node_modules/bson/lib/bson/long.js

,

line 475

Returns this Long divided by the given one.

Name Type Description other Long

Long by which to divide.

Returns: Long divided by the given one.
equals(other){boolean} node_modules/bson/lib/bson/long.js

,

line 240

Return whether this Long equals the other

Name Type Description other Long

Long to compare against.

Returns: this Long equals the other
getHighBits(){number} node_modules/bson/lib/bson/long.js

,

line 155

Return the high 32-bits value.

Returns: high 32-bits as a signed value.
getLowBits(){number} node_modules/bson/lib/bson/long.js

,

line 165

Return the low 32-bits value.

Returns: low 32-bits as a signed value.
getLowBitsUnsigned(){number} node_modules/bson/lib/bson/long.js

,

line 175

Return the low unsigned 32-bits value.

Returns: low 32-bits as an unsigned value.
getNumBitsAbs(){number} node_modules/bson/lib/bson/long.js

,

line 185

Returns the number of bits needed to represent the absolute value of this Long.

Returns: the number of bits needed to represent the absolute value of this Long.
greaterThan(other){boolean} node_modules/bson/lib/bson/long.js

,

line 284

Return whether this Long is greater than the other.

Name Type Description other Long

Long to compare against.

Returns: this Long is greater than the other.
greaterThanOrEqual(other){boolean} node_modules/bson/lib/bson/long.js

,

line 295

Return whether this Long is greater than or equal to the other.

Name Type Description other Long

Long to compare against.

Returns: this Long is greater than or equal to the other.
isNegative(){boolean} node_modules/bson/lib/bson/long.js

,

line 219

Return whether this value is negative.

Returns: this value is negative.
isOdd(){boolean} node_modules/bson/lib/bson/long.js

,

line 229

Return whether this value is odd.

Returns: this value is odd.
isZero(){boolean} node_modules/bson/lib/bson/long.js

,

line 209

Return whether this value is zero.

Returns: this value is zero.
lessThan(other){boolean} node_modules/bson/lib/bson/long.js

,

line 262

Return whether this Long is less than the other.

Name Type Description other Long

Long to compare against.

Returns: this Long is less than the other.
lessThanOrEqual(other){boolean} node_modules/bson/lib/bson/long.js

,

line 273

Return whether this Long is less than or equal to the other.

Name Type Description other Long

Long to compare against.

Returns: this Long is less than or equal to the other.
modulo(other){Long} node_modules/bson/lib/bson/long.js

,

line 561

Returns this Long modulo the given one.

Name Type Description other Long

Long by which to mod.

Returns: Long modulo the given one.
multiply(other){Long} node_modules/bson/lib/bson/long.js

,

line 398

Returns the product of this and the given Long.

Name Type Description other Long

Long to multiply with this.

Returns: product of this and the other.
negate(){Long} node_modules/bson/lib/bson/long.js

,

line 334

The negation of this value.

Returns: negation of this value.
not(){Long} node_modules/bson/lib/bson/long.js

,

line 571

The bitwise-NOT of this value.

Returns: bitwise-NOT of this value.
notEquals(other){boolean} node_modules/bson/lib/bson/long.js

,

line 251

Return whether this Long does not equal the other.

Name Type Description other Long

Long to compare against.

Returns: this Long does not equal the other.
or(other){Long} node_modules/bson/lib/bson/long.js

,

line 593

Returns the bitwise-OR of this Long and the given one.

Name Type Description other Long

the Long with which to OR.

Returns: bitwise-OR of this and the other.
shiftLeft(numBits){Long} node_modules/bson/lib/bson/long.js

,

line 615

Returns this Long with bits shifted to the left by the given amount.

Name Type Description numBits number

the number of bits by which to shift.

Returns: shifted to the left by the given amount.
shiftRight(numBits){Long} node_modules/bson/lib/bson/long.js

,

line 637

Returns this Long with bits shifted to the right by the given amount.

Name Type Description numBits number

the number of bits by which to shift.

Returns: shifted to the right by the given amount.
shiftRightUnsigned(numBits){Long} node_modules/bson/lib/bson/long.js

,

line 659

Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.

Name Type Description numBits number

the number of bits by which to shift.

Returns: shifted to the right by the given amount, with zeros placed into the new leading bits.
subtract(other){Long} node_modules/bson/lib/bson/long.js

,

line 387

Returns the difference of this and the given Long.

Name Type Description other Long

Long to subtract from this.

Returns: difference of this and the given Long.
toBigInt() node_modules/bson/lib/bson/long.js

,

line 81

Converts the Long to a BigInt (arbitrary precision).

toInt(){number} node_modules/bson/lib/bson/long.js

,

line 66

Return the int value.

Returns: value, assuming it is a 32-bit integer.
toJSON(){string} node_modules/bson/lib/bson/long.js

,

line 91

Return the JSON value.

Returns: JSON representation.
toNumber(){number} node_modules/bson/lib/bson/long.js

,

line 76

Return the Number value.

Returns: closest floating-point representation to this value.
toString(opt_radix){string} node_modules/bson/lib/bson/long.js

,

line 102

Return the String value.

Name Type Description opt_radix number optional

the radix in which the text should be written.

Returns: textual representation of this value.
xor(other){Long} node_modules/bson/lib/bson/long.js

,

line 604

Returns the bitwise-XOR of this Long and the given one.

Name Type Description other Long

the Long with which to XOR.

Returns: bitwise-XOR of this and the other.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4