ESC
No recent searches
Search by
Standard Library  /  Uint64

Uint64

Utilities for working with the Uint64 type.

Edit on GitHub
Added in 0.6.0 No other changes yet.
from "uint64" include Uint64

Values

Functions and constants included in the Uint64 module.

Uint64.fromNumber

Added in 0.6.0 No other changes yet.
fromNumber : (number: Number) => Uint64

Converts a Number to a Uint64.

Parameters:

number: The value to convert

Returns:

Uint64: The Number represented as a Uint64

Uint64.toNumber

Added in 0.6.0 No other changes yet.
toNumber : (value: Uint64) => Number

Converts a Uint64 to a Number.

Parameters:

value: The value to convert

Returns:

Number: The Uint64 represented as a Number

Uint64.fromInt64

Added in 0.6.0 No other changes yet.
fromInt64 : (number: Int64) => Uint64

Converts an Int64 to a Uint64.

Parameters:

number: The value to convert

Returns:

Uint64: The Int64 represented as a Uint64

Uint64.incr

Added in 0.6.0 No other changes yet.
incr : (value: Uint64) => Uint64

Increments the value by one.

Parameters:

value: The value to increment

Returns:

Uint64: The incremented value

Uint64.decr

Added in 0.6.0 No other changes yet.
decr : (value: Uint64) => Uint64

Decrements the value by one.

Parameters:

value: The value to decrement

Returns:

Uint64: The decremented value

Uint64.(+)

Added in 0.6.0 No other changes yet.
(+) : (x: Uint64, y: Uint64) => Uint64

Computes the sum of its operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: The sum of the two operands

Uint64.(-)

Added in 0.6.0 No other changes yet.
(-) : (x: Uint64, y: Uint64) => Uint64

Computes the difference of its operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: The difference of the two operands

Uint64.(*)

Added in 0.6.0 No other changes yet.
(*) : (x: Uint64, y: Uint64) => Uint64

Computes the product of its operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: The product of the two operands

Uint64.(/)

Added in 0.6.0 No other changes yet.
(/) : (x: Uint64, y: Uint64) => Uint64

Computes the quotient of its operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: The quotient of its operands

Uint64.rem

Added in 0.6.0 No other changes yet.
rem : (x: Uint64, y: Uint64) => Uint64

Computes the remainder of the division of its operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: The remainder of its operands

Uint64.rotl

Added in 0.6.0 No other changes yet.
rotl : (value: Uint64, amount: Uint64) => Uint64

Rotates the bits of the value left by the given number of bits.

Parameters:

value: The value to rotate
amount: The number of bits to rotate by

Returns:

Uint64: The rotated value

Uint64.rotr

Added in 0.6.0 No other changes yet.
rotr : (value: Uint64, amount: Uint64) => Uint64

Rotates the bits of the value right by the given number of bits.

Parameters:

value: The value to rotate
amount: The number of bits to rotate by

Returns:

Uint64: The rotated value

Uint64.(<<)

Added in 0.6.0 No other changes yet.
(<<) : (value: Uint64, amount: Uint64) => Uint64

Shifts the bits of the value left by the given number of bits.

Parameters:

value: The value to shift
amount: The number of bits to shift by

Returns:

Uint64: The shifted value

Uint64.(>>>)

Added in 0.6.0 No other changes yet.
(>>>) : (value: Uint64, amount: Uint64) => Uint64

Shifts the bits of the value right by the given number of bits.

Parameters:

value: The value to shift
amount: The amount to shift by

Returns:

Uint64: The shifted value

Uint64.(==)

Added in 0.6.0 No other changes yet.
(==) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is equal to the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is equal to the second value or false otherwise

Uint64.(!=)

Added in 0.6.0 No other changes yet.
(!=) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is not equal to the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is not equal to the second value or false otherwise

Uint64.eqz

Added in 0.6.0 No other changes yet.
eqz : (value: Uint64) => Bool

Checks if the given value is equal to zero.

Parameters:

value: The value to inspect

Returns:

Bool: true if the first value is equal to zero or false otherwise

Uint64.(<)

Added in 0.6.0 No other changes yet.
(<) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is less than the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is less than the second value or false otherwise

Uint64.(>)

Added in 0.6.0 No other changes yet.
(>) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is greater than the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is greater than the second value or false otherwise

Uint64.(<=)

Added in 0.6.0 No other changes yet.
(<=) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is less than or equal to the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is less than or equal to the second value or false otherwise

Uint64.(>=)

Added in 0.6.0 No other changes yet.
(>=) : (x: Uint64, y: Uint64) => Bool

Checks if the first value is greater than or equal to the second value.

Parameters:

x: The first value
y: The second value

Returns:

Bool: true if the first value is greater than or equal to the second value or false otherwise

Uint64.lnot

Added in 0.6.0 No other changes yet.
lnot : (value: Uint64) => Uint64

Computes the bitwise NOT of the given value.

Parameters:

value: The given value

Returns:

Uint64: Containing the inverted bits of the given value

Uint64.(&)

Added in 0.6.0 No other changes yet.
(&) : (x: Uint64, y: Uint64) => Uint64

Computes the bitwise AND (&) on the given operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: Containing a 1 in each bit position for which the corresponding bits of both operands are 1

Uint64.(|)

Added in 0.6.0 No other changes yet.
(|) : (x: Uint64, y: Uint64) => Uint64

Computes the bitwise OR (|) on the given operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: Containing a 1 in each bit position for which the corresponding bits of either or both operands are 1

Uint64.(^)

Added in 0.6.0 No other changes yet.
(^) : (x: Uint64, y: Uint64) => Uint64

Computes the bitwise XOR (^) on the given operands.

Parameters:

x: The first operand
y: The second operand

Returns:

Uint64: Containing a 1 in each bit position for which the corresponding bits of either but not both operands are 1

Uint64.clz

Added in 0.6.0 No other changes yet.
clz : (value: Uint64) => Uint64

Counts the number of leading zero bits in the value.

Parameters:

value: The value to inspect

Returns:

Uint64: The amount of leading zeros

Uint64.ctz

Added in 0.6.0 No other changes yet.
ctz : (value: Uint64) => Uint64

Counts the number of trailing zero bits in the value.

Parameters:

value: The value to inspect

Returns:

Uint64: The amount of trailing zeros

Uint64.popcnt

Added in 0.6.0 No other changes yet.
popcnt : (value: Uint64) => Uint64

Counts the number of bits set to 1 in the value, also known as a population count.

Parameters:

value: The value to inspect

Returns:

Uint64: The amount of 1-bits in its operand

Sign up for farm-to-inbox developer news

You can unsubscribe at any time. Read our privacy policy.

Copyright © 2024 The Grain Programming Language