1///|
2/// This package is based on the Go implementation found here:
3/// https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/md5/md5.go
4/// which has the copyright notice:
5/// Copyright 2009 The Go Authors. All rights reserved.
6/// Use of this source code is governed by a BSD-style
7/// license that can be found in the LICENSE file.
8
9// The size of an MD5 checksum in bytes.
10let Int
This package is based on the Go implementation found here:
https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/md5/md5.go
which has the copyright notice:
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
size = 16
11
12// The blocksize of MD5 in bytes.
13///|
14let Int
block_size = 64
15
16///|
17let UInt
init0 = 0x67452301U
18
19///|
20let UInt
init1 = 0xEFCDAB89U
21
22///|
23let UInt
init2 = 0x98BADCFEU
24
25///|
26let UInt
init3 = 0x10325476U
27
28///|
29/// `Digest` represents the partial evaluation of a checksum.
30struct Digest {
31 FixedArray[UInt]
s : type FixedArray[A]
FixedArray[UInt
UInt] // 4
32 FixedArray[Byte]
x : type FixedArray[A]
FixedArray[Byte
Byte] // block_size
33 mut Int
nx : Int
Int
34 mut UInt64
len : UInt64
UInt64
35 // workaround to get rid of compiler warning:
36 // See: https://discord.com/channels/1135479745207869510/1272985768498958387/1275082247484997693
37 String
name : String
String
38}
39
40///|
41/// `Digest::new` returns a new, reset Digest, ready to sum.
42pub fn struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest::() -> Digest
Digest::new returns a new, reset Digest, ready to sum.
new() -> struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest {
43 {
44 FixedArray[UInt]
s: type FixedArray[A]
FixedArray::(array : Array[UInt]) -> FixedArray[UInt]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([UInt
init0, UInt
init1, UInt
init2, UInt
init3]),
45 FixedArray[Byte]
x: type FixedArray[A]
FixedArray::(len : Int, init : Byte) -> FixedArray[Byte]
Creates a new fixed-size array with the specified length, initializing all
elements with the given value.
Parameters:
length : The length of the array to create. Must be non-negative.
initial_value : The value used to initialize all elements in the array.
Returns a new fixed-size array of type FixedArray[T] with length
elements, where each element is initialized to initial_value.
Throws a panic if length is negative.
Example:
test "FixedArray::make" {
let arr = FixedArray::make(3, 42)
inspect(arr[0], content="42")
inspect(arr.length(), content="3")
}
test "panic FixedArray::make/negative_length" {
ignore(FixedArray::make(-1, 0))
}
WARNING: A common pitfall is creating with the same initial value, for example:
test {
let two_dimension_array = FixedArray::make(10, FixedArray::make(10, 0))
two_dimension_array[0][5] = 10
assert_eq(two_dimension_array[5][5], 10)
}
This is because all the cells reference to the same object (the FixedArray[Int] in this case).
One should use makei() instead which creates an object for each index.
make(Int
block_size, b'\x00'),
46 Int
nx: 0,
47 UInt64
len: 0,
48 // workaround to get rid of compiler warning:
49 String
name: "md5",
50 }
51}
52
53///|
54let &HashFunc
_trait : &trait HashFunc {
name(Self) -> String
write(Self, Byte) -> Unit
check_sum(Self) -> String
}
HashFunc represents a hash algorithm like @crc32, @md5, or @sha256.
HashFunc = struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest::() -> Digest
Digest::new returns a new, reset Digest, ready to sum.
new()
55
56///|
57pub impl trait HashFunc {
name(Self) -> String
write(Self, Byte) -> Unit
check_sum(Self) -> String
}
HashFunc represents a hash algorithm like @crc32, @md5, or @sha256.
HashFunc for struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest with (self : Digest) -> String
name(Digest
self) {
58 Digest
self.String
name
59}
60
61///|
62/// `check_sum` returns the final md5sum as a hex string.
63pub impl trait HashFunc {
name(Self) -> String
write(Self, Byte) -> Unit
check_sum(Self) -> String
}
HashFunc represents a hash algorithm like @crc32, @md5, or @sha256.
HashFunc for struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest with (self : Digest) -> String
check_sum returns the final md5sum as a hex string.
check_sum(Digest
self) {
64 // Append 0x80 to the end of the message and then append zeros
65 // until the length is a multiple of 56 bytes. Finally append
66 // 8 bytes representing the message length in bits.
67 //
68 // 1 byte end marker :: 0-63 padding bytes :: 8 byte length
69 let FixedArray[Byte]
tmp = type FixedArray[A]
FixedArray::(len : Int, init : Byte) -> FixedArray[Byte]
Creates a new fixed-size array with the specified length, initializing all
elements with the given value.
Parameters:
length : The length of the array to create. Must be non-negative.
initial_value : The value used to initialize all elements in the array.
Returns a new fixed-size array of type FixedArray[T] with length
elements, where each element is initialized to initial_value.
Throws a panic if length is negative.
Example:
test "FixedArray::make" {
let arr = FixedArray::make(3, 42)
inspect(arr[0], content="42")
inspect(arr.length(), content="3")
}
test "panic FixedArray::make/negative_length" {
ignore(FixedArray::make(-1, 0))
}
WARNING: A common pitfall is creating with the same initial value, for example:
test {
let two_dimension_array = FixedArray::make(10, FixedArray::make(10, 0))
two_dimension_array[0][5] = 10
assert_eq(two_dimension_array[5][5], 10)
}
This is because all the cells reference to the same object (the FixedArray[Int] in this case).
One should use makei() instead which creates an object for each index.
make(1 (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 63 (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 8, b'\x00')
70 FixedArray[Byte]
tmp[0] = b'\x80'
71 let Int
pad = ((55UL (self : UInt64, other : UInt64) -> UInt64
Performs subtraction between two unsigned 64-bit integers. When the result
would be negative, the function wraps around using modular arithmetic (2^64).
Parameters:
self : The first unsigned 64-bit integer (minuend).
other : The second unsigned 64-bit integer to subtract from the first
(subtrahend).
Returns the difference between the two numbers, wrapped around if necessary.
Example:
test "UInt64::op_sub" {
let a = 5UL
let b = 3UL
inspect(a - b, content="2")
let c = 3UL
let d = 5UL
inspect(c - d, content="18446744073709551614") // wraps around to 2^64 - 2
}
- Digest
self.UInt64
len) (self : UInt64, other : UInt64) -> UInt64
Calculates the remainder of dividing one unsigned 64-bit integer by another.
Parameters:
self : The dividend unsigned 64-bit integer.
other : The divisor unsigned 64-bit integer.
Returns the remainder of the division operation.
Throws a panic if the divisor is zero.
Example:
test "UInt64::op_mod" {
let a = 17UL
let b = 5UL
inspect(a % b, content="2") // 17 divided by 5 gives quotient 3 and remainder 2
inspect(7UL % 4UL, content="3")
}
test "panic UInt64::op_mod/division_by_zero" {
let a = 42UL
ignore(a % 0UL) // Panics: division by zero
}
% Int
block_size.(self : Int) -> Int64
Converts a 32-bit signed integer to a 64-bit signed integer. All 32-bit
integers can be represented exactly in 64-bit integer format, so the
conversion is lossless.
Parameters:
self : The 32-bit signed integer to be converted.
Returns a 64-bit signed integer that represents the same numerical value as
the input.
Example:
test "Int::to_int64" {
let n = 42
inspect(n.to_int64(), content="42")
let neg = -42
inspect(neg.to_int64(), content="-42")
}
to_int64().(self : Int64) -> UInt64
Reinterprets a 64-bit signed integer as an unsigned 64-bit integer without
changing its bit pattern. The reinterpretation follows the standard two's
complement representation rules.
Parameters:
self : The 64-bit signed integer to be reinterpreted.
Returns a 64-bit unsigned integer that has the same bit pattern as the input.
Example:
test "Int64::reinterpret_as_uint64" {
let neg = -1L
inspect(neg.reinterpret_as_uint64(), content="18446744073709551615") // All bits set to 1
let pos = 42L
inspect(pos.reinterpret_as_uint64(), content="42") // Positive numbers remain unchanged
}
reinterpret_as_uint64()).(self : UInt64) -> Int
Converts an unsigned 64-bit integer to a 32-bit signed integer. The
conversion truncates the value to fit within the 32-bit range, possibly
losing information if the input value is too large.
Parameters:
self : The unsigned 64-bit integer to be converted.
Returns a 32-bit signed integer representing the lower 32 bits of the input
value. If the input value is larger than the maximum value of a 32-bit signed
integer (2147483647), the result will be the truncated value interpreted as a
signed integer.
Example:
test "UInt64::to_int" {
let a = 42UL
inspect(a.to_int(), content="42")
let b = 18446744073709551615UL // max value of UInt64
inspect(b.to_int(), content="-1") // truncated to 32 bits
}
to_int() // calculate number of padding bytes
72 (b : FixedArray[Byte], offset : Int, value : UInt64) -> Unit
le_put_uint64(FixedArray[Byte]
tmp, 1 (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ Int
pad, Digest
self.UInt64
len (self : UInt64, shift : Int) -> UInt64
Performs a bitwise left shift operation on an unsigned 64-bit integer.
Parameters:
self : The unsigned 64-bit integer to be shifted.
shift : The number of positions to shift the bits to the left. Must be
between 0 and 63 inclusive, values outside this range will be masked with & 63.
Returns the result of shifting self left by shift positions. For each
position shifted, the rightmost bit is filled with 0, and the leftmost bit is
discarded.
Example:
test "UInt64::op_shl" {
let x = 1UL
inspect(x << 3, content="8") // 1 shifted left by 3 positions becomes 8
inspect(x << 63, content="9223372036854775808") // 1 shifted left by 63 positions
}
<< 3) // append length in bits
73 for Int
i = 0; Int
i (self_ : Int, other : Int) -> Bool
< 1 (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ Int
pad (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 8; Int
i = Int
i (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 1 {
74 Digest
self.(self : Digest, b : Byte) -> Unit
write writes a byte to the digest.
write(FixedArray[Byte]
tmp(FixedArray[Byte], Int) -> Byte
Retrieves an element at the specified index from a fixed-size array. This
function implements the array indexing operator [].
Parameters:
array : The fixed-size array to access.
index : The position in the array from which to retrieve the element.
Returns the element at the specified index.
Throws a runtime error if the index is out of bounds (negative or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_get" {
let arr = FixedArray::make(3, 42)
inspect(arr[1], content="42")
}
test "panic FixedArray::op_get/out_of_bounds" {
let arr = FixedArray::make(3, 0)
ignore(arr[3]) // Index out of bounds
}
[i])
75 }
76
77 // The previous write ensures that a whole number of
78 // blocks (i.e. a multiple of 64 bytes) have been hashed.
79 if Digest
self.Int
nx (x : Int, y : Int) -> Bool
!= 0 {
80 () -> Unit
panic()
81 }
82
83 // Generate digest
84 let FixedArray[Byte]
digest = type FixedArray[A]
FixedArray::(len : Int, init : Byte) -> FixedArray[Byte]
Creates a new fixed-size array with the specified length, initializing all
elements with the given value.
Parameters:
length : The length of the array to create. Must be non-negative.
initial_value : The value used to initialize all elements in the array.
Returns a new fixed-size array of type FixedArray[T] with length
elements, where each element is initialized to initial_value.
Throws a panic if length is negative.
Example:
test "FixedArray::make" {
let arr = FixedArray::make(3, 42)
inspect(arr[0], content="42")
inspect(arr.length(), content="3")
}
test "panic FixedArray::make/negative_length" {
ignore(FixedArray::make(-1, 0))
}
WARNING: A common pitfall is creating with the same initial value, for example:
test {
let two_dimension_array = FixedArray::make(10, FixedArray::make(10, 0))
two_dimension_array[0][5] = 10
assert_eq(two_dimension_array[5][5], 10)
}
This is because all the cells reference to the same object (the FixedArray[Int] in this case).
One should use makei() instead which creates an object for each index.
make(Int
This package is based on the Go implementation found here:
https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/md5/md5.go
which has the copyright notice:
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
size, b'\x00')
85 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
digest, 0, Digest
self.FixedArray[UInt]
s[0])
86 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
digest, 4, Digest
self.FixedArray[UInt]
s[1])
87 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
digest, 8, Digest
self.FixedArray[UInt]
s[2])
88 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
digest, 12, Digest
self.FixedArray[UInt]
s[3])
89 let @buffer.T
result = (size_hint~ : Int) -> @buffer.T
Creates a new extensible buffer with specified initial capacity. If the
initial capacity is less than 1, the buffer will be initialized with capacity
1.
Parameters:
size_hint : Initial capacity of the buffer in bytes. Defaults to 0.
Returns a new buffer of type T.
Example:
test "new" {
let buf = @buffer.new(size_hint=10)
inspect(buf.length(), content="0")
buf.write_string("test")
inspect(buf.length(), content="8")
}
@buffer.new(Int
size_hint=2 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* Int
This package is based on the Go implementation found here:
https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/md5/md5.go
which has the copyright notice:
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
size)
90 for Byte
b in FixedArray[Byte]
digest {
91 @buffer.T
result.(self : @buffer.T, value : Char) -> Unit
Writes a UTF-16LE encoded character into the buffer. Automatically grows the
buffer if necessary.
Parameters:
buffer : The buffer to write to.
char : The character to be written.
Example:
test "write_char" {
let buf = @buffer.new()
buf.write_char('A')
inspect(buf.contents(), content=
#|b"\x41\x00"
)
}
write_char((v : Int) -> Char
to_hex((Byte
b.(self : Byte) -> Int
Converts a byte value to a 32-bit signed integer. The resulting integer will
have the same binary representation as the byte value, preserving the
numerical value in the range [0, 255].
Parameters:
byte : The byte value to be converted to an integer.
Returns a 32-bit signed integer representing the same numerical value as the
input byte.
Example:
test "Byte::to_int" {
let b = b'\xFF' // byte with value 255
inspect(b.to_int(), content="255")
let zero = b'\x00'
inspect(zero.to_int(), content="0")
}
to_int() (self : Int, other : Int) -> Int
Performs an arithmetic right shift operation on an integer value. Shifts the
bits of the first operand to the right by the number of positions specified
by the second operand. The sign bit is preserved and copied to the leftmost
positions.
Parameters:
self : The integer value to be shifted.
shift : The number of positions to shift the bits to the right. Must be
non-negative.
Returns an integer representing the result of the arithmetic right shift
operation.
Example:
test "Int::op_shr" {
let n = -16
inspect(n >> 2, content="-4") // Sign bit is preserved during shift
let p = 16
inspect(p >> 2, content="4") // Regular right shift for positive numbers
}
>> 4) (Int, Int) -> Int
& 0xf))
92 @buffer.T
result.(self : @buffer.T, value : Char) -> Unit
Writes a UTF-16LE encoded character into the buffer. Automatically grows the
buffer if necessary.
Parameters:
buffer : The buffer to write to.
char : The character to be written.
Example:
test "write_char" {
let buf = @buffer.new()
buf.write_char('A')
inspect(buf.contents(), content=
#|b"\x41\x00"
)
}
write_char((v : Int) -> Char
to_hex(Byte
b.(self : Byte) -> Int
Converts a byte value to a 32-bit signed integer. The resulting integer will
have the same binary representation as the byte value, preserving the
numerical value in the range [0, 255].
Parameters:
byte : The byte value to be converted to an integer.
Returns a 32-bit signed integer representing the same numerical value as the
input byte.
Example:
test "Byte::to_int" {
let b = b'\xFF' // byte with value 255
inspect(b.to_int(), content="255")
let zero = b'\x00'
inspect(zero.to_int(), content="0")
}
to_int() (Int, Int) -> Int
& 0xf))
93 }
94 @buffer.T
result.(self : @buffer.T) -> Bytes
Returns a copy of the buffer's content as a sequence of bytes.
Parameters:
buffer : The buffer to read from.
Returns a Bytes object containing all bytes written to the buffer.
Example:
test "contents" {
let buf = @buffer.new()
buf.write_string("Test")
inspect(
buf.contents(),
content=
#|b"\x54\x00\x65\x00\x73\x00\x74\x00"
,
)
}
contents().(self : Bytes, offset~ : Int = .., length~ : Int = ..) -> String
Return an unchecked string, containing the subsequence of self that starts at
offset and has length length. Both offset and length
are indexed by byte.
Note this function does not validate the encoding of the byte sequence,
it simply copy the bytes into a new String.
to_unchecked_string()
95}
96
97///|
98/// `reset` resets a digest for re-use.
99pub fn (self : Digest) -> Unit
reset resets a digest for re-use.
reset(Digest
self : struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest) -> Unit
Unit {
100 Digest
self.FixedArray[UInt]
s[0] = UInt
init0
101 Digest
self.FixedArray[UInt]
s[1] = UInt
init1
102 Digest
self.FixedArray[UInt]
s[2] = UInt
init2
103 Digest
self.FixedArray[UInt]
s[3] = UInt
init3
104 Digest
self.Int
nx = 0
105 Digest
self.UInt64
len = 0
106}
107
108///|
109/// `write` writes a byte to the digest.
110pub impl trait HashFunc {
name(Self) -> String
write(Self, Byte) -> Unit
check_sum(Self) -> String
}
HashFunc represents a hash algorithm like @crc32, @md5, or @sha256.
HashFunc for struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest with (self : Digest, b : Byte) -> Unit
write writes a byte to the digest.
write(Digest
self, Byte
b) {
111 Digest
self.UInt64
len (self : UInt64, other : UInt64) -> UInt64
Adds two 64-bit unsigned integers. This is the implementation of the +
operator for UInt64.
Parameters:
self : The first unsigned 64-bit integer operand.
other : The second unsigned 64-bit integer operand.
Returns the sum of the two unsigned 64-bit integers. If the result overflows,
it wraps around modulo 2^64.
Example:
test "UInt64::op_add" {
let a = 42UL
let b = 100UL
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 18446744073709551615UL
inspect(max + 1UL, content="0")
}
+= 1
112 Digest
self.FixedArray[Byte]
x(FixedArray[Byte], Int, Byte) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[self.Int
nx] = Byte
b
113 Digest
self.Int
nx (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+= 1
114 if Digest
self.Int
nx (self : Int, other : Int) -> Bool
Compares two integers for equality.
Parameters:
self : The first integer to compare.
other : The second integer to compare.
Returns true if both integers have the same value, false otherwise.
Example:
test "Int::op_equal" {
inspect(42 == 42, content="true")
inspect(42 == -42, content="false")
}
== Int
block_size {
115 Digest
self.(self : Digest) -> Unit
block_generic()
116 Digest
self.Int
nx = 0
117 }
118}
119
120///|
121fn (self : Digest) -> Unit
block_generic(Digest
self : struct Digest {
s: FixedArray[UInt]
x: FixedArray[Byte]
mut nx: Int
mut len: UInt64
name: String
}
Digest represents the partial evaluation of a checksum.
Digest) -> Unit
Unit {
122 // load state
123 let mut UInt
a = Digest
self.FixedArray[UInt]
s[0]
124 let mut UInt
b = Digest
self.FixedArray[UInt]
s[1]
125 let mut UInt
c = Digest
self.FixedArray[UInt]
s[2]
126 let mut UInt
d = Digest
self.FixedArray[UInt]
s[3]
127
128 // save current state
129 let FixedArray[Byte]
q = Digest
self.FixedArray[Byte]
x
130
131 // load input block
132 let UInt
x0 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x0)
133 let UInt
x1 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x1)
134 let UInt
x2 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x2)
135 let UInt
x3 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x3)
136 let UInt
x4 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x4)
137 let UInt
x5 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x5)
138 let UInt
x6 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x6)
139 let UInt
x7 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x7)
140 let UInt
x8 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x8)
141 let UInt
x9 = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0x9)
142 let UInt
xa = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xa)
143 let UInt
xb = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xb)
144 let UInt
xc = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xc)
145 let UInt
xd = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xd)
146 let UInt
xe = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xe)
147 let UInt
xf = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
q, 4 (self : Int, other : Int) -> Int
Multiplies two 32-bit integers. This is the implementation of the *
operator for Int.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns the product of the two integers. If the result overflows the range of
Int, it wraps around according to two's complement arithmetic.
Example:
test "Int::op_mul" {
inspect(42 * 2, content="84")
inspect(-10 * 3, content="-30")
let max = 2147483647 // Int.max_value
inspect(max * 2, content="-2") // Overflow wraps around
}
* 0xf)
148
149 // round 1
150 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x0 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xd76aa478, 7)
151 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x1 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xe8c7b756, 12)
152 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x2 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x242070db, 17)
153 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x3 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xc1bdceee, 22)
154 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x4 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf57c0faf, 7)
155 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x5 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x4787c62a, 12)
156 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x6 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xa8304613, 17)
157 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x7 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfd469501, 22)
158 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x8 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x698098d8, 7)
159 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x9 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x8b44f7af, 12)
160 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xa (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xffff5bb1, 17)
161 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xb (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x895cd7be, 22)
162 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xc (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x6b901122, 7)
163 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xd (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfd987193, 12)
164 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xe (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xa679438e, 17)
165 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xf (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x49b40821, 22)
166
167 // round 2
168 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x1 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf61e2562, 5)
169 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x6 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xc040b340, 9)
170 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xb (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x265e5a51, 14)
171 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x0 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xe9b6c7aa, 20)
172 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x5 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xd62f105d, 5)
173 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xa (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x02441453, 9)
174 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xf (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xd8a1e681, 14)
175 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x4 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xe7d3fbc8, 20)
176 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x9 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x21e1cde6, 5)
177 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xe (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xc33707d6, 9)
178 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x3 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf4d50d87, 14)
179 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x8 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x455a14ed, 20)
180 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
b (UInt, UInt) -> UInt
^ UInt
c) (UInt, UInt) -> UInt
& UInt
d) (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xd (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xa9e3e905, 5)
181 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
a (UInt, UInt) -> UInt
^ UInt
b) (UInt, UInt) -> UInt
& UInt
c) (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x2 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfcefa3f8, 9)
182 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
d (UInt, UInt) -> UInt
^ UInt
a) (UInt, UInt) -> UInt
& UInt
b) (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x7 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x676f02d9, 14)
183 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((((UInt
c (UInt, UInt) -> UInt
^ UInt
d) (UInt, UInt) -> UInt
& UInt
a) (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xc (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x8d2a4c8a, 20)
184
185 // round 3
186 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ UInt
c (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x5 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfffa3942, 4)
187 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ UInt
b (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x8 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x8771f681, 11)
188 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ UInt
a (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xb (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x6d9d6122, 16)
189 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ UInt
d (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xe (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfde5380c, 23)
190 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ UInt
c (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x1 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xa4beea44, 4)
191 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ UInt
b (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x4 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x4bdecfa9, 11)
192 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ UInt
a (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x7 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf6bb4b60, 16)
193 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ UInt
d (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xa (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xbebfbc70, 23)
194 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ UInt
c (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xd (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x289b7ec6, 4)
195 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ UInt
b (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x0 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xeaa127fa, 11)
196 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ UInt
a (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x3 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xd4ef3085, 16)
197 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ UInt
d (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x6 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x04881d05, 23)
198 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ UInt
c (UInt, UInt) -> UInt
^ UInt
d) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x9 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xd9d4d039, 4)
199 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ UInt
b (UInt, UInt) -> UInt
^ UInt
c) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xc (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xe6db99e5, 11)
200 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ UInt
a (UInt, UInt) -> UInt
^ UInt
b) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xf (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x1fa27cf8, 16)
201 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ UInt
d (UInt, UInt) -> UInt
^ UInt
a) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x2 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xc4ac5665, 23)
202
203 // round 4
204 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ (UInt
b (UInt, UInt) -> UInt
| UInt
d.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x0 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf4292244, 6)
205 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ (UInt
a (UInt, UInt) -> UInt
| UInt
c.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x7 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x432aff97, 10)
206 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ (UInt
d (UInt, UInt) -> UInt
| UInt
b.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xe (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xab9423a7, 15)
207 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ (UInt
c (UInt, UInt) -> UInt
| UInt
a.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x5 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfc93a039, 21)
208 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ (UInt
b (UInt, UInt) -> UInt
| UInt
d.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xc (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x655b59c3, 6)
209 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ (UInt
a (UInt, UInt) -> UInt
| UInt
c.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x3 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x8f0ccc92, 10)
210 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ (UInt
d (UInt, UInt) -> UInt
| UInt
b.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xa (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xffeff47d, 15)
211 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ (UInt
c (UInt, UInt) -> UInt
| UInt
a.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x1 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x85845dd1, 21)
212 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ (UInt
b (UInt, UInt) -> UInt
| UInt
d.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x8 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x6fa87e4f, 6)
213 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ (UInt
a (UInt, UInt) -> UInt
| UInt
c.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xf (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xfe2ce6e0, 10)
214 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ (UInt
d (UInt, UInt) -> UInt
| UInt
b.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x6 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xa3014314, 15)
215 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ (UInt
c (UInt, UInt) -> UInt
| UInt
a.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xd (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x4e0811a1, 21)
216 UInt
a = UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
c (UInt, UInt) -> UInt
^ (UInt
b (UInt, UInt) -> UInt
| UInt
d.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x4 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xf7537e82, 6)
217 UInt
d = UInt
a (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
b (UInt, UInt) -> UInt
^ (UInt
a (UInt, UInt) -> UInt
| UInt
c.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
xb (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xbd3af235, 10)
218 UInt
c = UInt
d (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
a (UInt, UInt) -> UInt
^ (UInt
d (UInt, UInt) -> UInt
| UInt
b.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x2 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0x2ad7d2bb, 15)
219 UInt
b = UInt
c (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ (x : UInt, r : Int) -> UInt
rotl((UInt
d (UInt, UInt) -> UInt
^ (UInt
c (UInt, UInt) -> UInt
| UInt
a.(self : UInt) -> UInt
Performs a bitwise NOT operation on an unsigned 32-bit integer. Flips all
bits in the number (changes each 0 to 1 and each 1 to 0).
Parameters:
self : The unsigned 32-bit integer value on which to perform the bitwise
NOT operation.
Returns a new unsigned 32-bit integer where each bit is inverted from the
input value.
Example:
test "UInt::lnot" {
let x = 0xFF00U // Binary: 1111_1111_0000_0000
inspect(x.lnot(), content="4294902015") // Binary: ...0000_0000_1111_1111
}
lnot())) (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
b (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ UInt
x9 (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+ 0xeb86d391, 21)
220
221 // save state
222 Digest
self.FixedArray[UInt]
s(FixedArray[UInt], Int, UInt) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[0] (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+= UInt
a
223 Digest
self.FixedArray[UInt]
s(FixedArray[UInt], Int, UInt) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[1] (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+= UInt
b
224 Digest
self.FixedArray[UInt]
s(FixedArray[UInt], Int, UInt) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[2] (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+= UInt
c
225 Digest
self.FixedArray[UInt]
s(FixedArray[UInt], Int, UInt) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[3] (self : UInt, other : UInt) -> UInt
Performs addition between two unsigned 32-bit integers. If the result
overflows, it wraps around according to the rules of modular arithmetic
(2^32).
Parameters:
self : The first unsigned 32-bit integer operand.
other : The second unsigned 32-bit integer operand to be added.
Returns the sum of the two unsigned integers, wrapped around if necessary.
Example:
test "UInt::op_add" {
let a = 42U
let b = 100U
inspect(a + b, content="142")
// Demonstrate overflow behavior
let max = 4294967295U // UInt::max_value
inspect(max + 1U, content="0")
}
+= UInt
d
226}
227
228///|
229fn (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32(FixedArray[Byte]
b : type FixedArray[A]
FixedArray[Byte
Byte], Int
offset : Int
Int) -> UInt
UInt {
230 FixedArray[Byte]
b(FixedArray[Byte], Int) -> Byte
Retrieves an element at the specified index from a fixed-size array. This
function implements the array indexing operator [].
Parameters:
array : The fixed-size array to access.
index : The position in the array from which to retrieve the element.
Returns the element at the specified index.
Throws a runtime error if the index is out of bounds (negative or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_get" {
let arr = FixedArray::make(3, 42)
inspect(arr[1], content="42")
}
test "panic FixedArray::op_get/out_of_bounds" {
let arr = FixedArray::make(3, 0)
ignore(arr[3]) // Index out of bounds
}
[offset].(self : Byte) -> UInt
Converts a Byte to a UInt.
Parameters:
byte : The Byte value to be converted.
Returns the UInt representation of the Byte.
to_uint() (UInt, UInt) -> UInt
|
231 (FixedArray[Byte]
b(FixedArray[Byte], Int) -> Byte
Retrieves an element at the specified index from a fixed-size array. This
function implements the array indexing operator [].
Parameters:
array : The fixed-size array to access.
index : The position in the array from which to retrieve the element.
Returns the element at the specified index.
Throws a runtime error if the index is out of bounds (negative or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_get" {
let arr = FixedArray::make(3, 42)
inspect(arr[1], content="42")
}
test "panic FixedArray::op_get/out_of_bounds" {
let arr = FixedArray::make(3, 0)
ignore(arr[3]) // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 1].(self : Byte) -> UInt
Converts a Byte to a UInt.
Parameters:
byte : The Byte value to be converted.
Returns the UInt representation of the Byte.
to_uint() (self : UInt, shift : Int) -> UInt
Performs a left shift operation on an unsigned 32-bit integer. Each bit in
the integer is shifted left by the specified number of positions, and zeros
are filled in from the right.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift. Only the least significant 5
bits are used, effectively making the shift count always between 0 and 31.
Returns a new unsigned 32-bit integer that is the result of shifting self
left by shift positions.
Example:
test "UInt::op_shl" {
let x = 1U
inspect(x << 3, content="8") // Binary: 1 -> 1000
let y = 0xFFFFFFFFU
inspect(y << 16, content="4294901760") // All bits after position 16 are discarded
}
<< 8) (UInt, UInt) -> UInt
|
232 (FixedArray[Byte]
b(FixedArray[Byte], Int) -> Byte
Retrieves an element at the specified index from a fixed-size array. This
function implements the array indexing operator [].
Parameters:
array : The fixed-size array to access.
index : The position in the array from which to retrieve the element.
Returns the element at the specified index.
Throws a runtime error if the index is out of bounds (negative or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_get" {
let arr = FixedArray::make(3, 42)
inspect(arr[1], content="42")
}
test "panic FixedArray::op_get/out_of_bounds" {
let arr = FixedArray::make(3, 0)
ignore(arr[3]) // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 2].(self : Byte) -> UInt
Converts a Byte to a UInt.
Parameters:
byte : The Byte value to be converted.
Returns the UInt representation of the Byte.
to_uint() (self : UInt, shift : Int) -> UInt
Performs a left shift operation on an unsigned 32-bit integer. Each bit in
the integer is shifted left by the specified number of positions, and zeros
are filled in from the right.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift. Only the least significant 5
bits are used, effectively making the shift count always between 0 and 31.
Returns a new unsigned 32-bit integer that is the result of shifting self
left by shift positions.
Example:
test "UInt::op_shl" {
let x = 1U
inspect(x << 3, content="8") // Binary: 1 -> 1000
let y = 0xFFFFFFFFU
inspect(y << 16, content="4294901760") // All bits after position 16 are discarded
}
<< 16) (UInt, UInt) -> UInt
|
233 (FixedArray[Byte]
b(FixedArray[Byte], Int) -> Byte
Retrieves an element at the specified index from a fixed-size array. This
function implements the array indexing operator [].
Parameters:
array : The fixed-size array to access.
index : The position in the array from which to retrieve the element.
Returns the element at the specified index.
Throws a runtime error if the index is out of bounds (negative or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_get" {
let arr = FixedArray::make(3, 42)
inspect(arr[1], content="42")
}
test "panic FixedArray::op_get/out_of_bounds" {
let arr = FixedArray::make(3, 0)
ignore(arr[3]) // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 3].(self : Byte) -> UInt
Converts a Byte to a UInt.
Parameters:
byte : The Byte value to be converted.
Returns the UInt representation of the Byte.
to_uint() (self : UInt, shift : Int) -> UInt
Performs a left shift operation on an unsigned 32-bit integer. Each bit in
the integer is shifted left by the specified number of positions, and zeros
are filled in from the right.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift. Only the least significant 5
bits are used, effectively making the shift count always between 0 and 31.
Returns a new unsigned 32-bit integer that is the result of shifting self
left by shift positions.
Example:
test "UInt::op_shl" {
let x = 1U
inspect(x << 3, content="8") // Binary: 1 -> 1000
let y = 0xFFFFFFFFU
inspect(y << 16, content="4294901760") // All bits after position 16 are discarded
}
<< 24)
234}
235
236///|
237fn (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
b : type FixedArray[A]
FixedArray[Byte
Byte], Int
offset : Int
Int, UInt
value : UInt
UInt) -> Unit
Unit {
238 FixedArray[Byte]
b(FixedArray[Byte], Int, Byte) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[offset] = (UInt
value (UInt, UInt) -> UInt
& 0xff).(self : UInt) -> Byte
Converts an unsigned 32-bit integer to a byte by taking its least significant
8 bits. Any bits beyond the first 8 bits are truncated.
Parameters:
self : The unsigned 32-bit integer to be converted. Only the least
significant 8 bits will be used.
Returns a byte containing the least significant 8 bits of the input integer.
Example:
test "UInt::to_byte" {
let n = 258U // In binary: 100000010
inspect(n.to_byte(), content="b'\\x02'") // Only keeps 00000010
let big = 4294967295U // Maximum value of UInt
inspect(big.to_byte(), content="b'\\xFF'") // Only keeps 11111111
}
to_byte()
239 FixedArray[Byte]
b(FixedArray[Byte], Int, Byte) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 1] = ((UInt
value (self : UInt, shift : Int) -> UInt
Performs a logical right shift operation on an unsigned 32-bit integer. The
operation shifts all bits to the right by a specified number of positions,
filling the leftmost positions with zeros.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift right. If this value is
negative, the behavior is undefined. Values larger than 31 are masked with & 31.
Returns a new unsigned 32-bit integer containing the result of the right
shift operation.
Example:
test "UInt::op_shr" {
let x = 0xFF000000U
inspect(x >> 8, content="16711680") // 0x00FF0000
inspect(x >> 24, content="255") // 0x000000FF
}
test "UInt::op_shr/large_shift" {
let x = 0xFF000000U
inspect(x >> 32, content="4278190080") // Same as x >> 0 due to masking
}
>> 8) (UInt, UInt) -> UInt
& 0xff).(self : UInt) -> Byte
Converts an unsigned 32-bit integer to a byte by taking its least significant
8 bits. Any bits beyond the first 8 bits are truncated.
Parameters:
self : The unsigned 32-bit integer to be converted. Only the least
significant 8 bits will be used.
Returns a byte containing the least significant 8 bits of the input integer.
Example:
test "UInt::to_byte" {
let n = 258U // In binary: 100000010
inspect(n.to_byte(), content="b'\\x02'") // Only keeps 00000010
let big = 4294967295U // Maximum value of UInt
inspect(big.to_byte(), content="b'\\xFF'") // Only keeps 11111111
}
to_byte()
240 FixedArray[Byte]
b(FixedArray[Byte], Int, Byte) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 2] = ((UInt
value (self : UInt, shift : Int) -> UInt
Performs a logical right shift operation on an unsigned 32-bit integer. The
operation shifts all bits to the right by a specified number of positions,
filling the leftmost positions with zeros.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift right. If this value is
negative, the behavior is undefined. Values larger than 31 are masked with & 31.
Returns a new unsigned 32-bit integer containing the result of the right
shift operation.
Example:
test "UInt::op_shr" {
let x = 0xFF000000U
inspect(x >> 8, content="16711680") // 0x00FF0000
inspect(x >> 24, content="255") // 0x000000FF
}
test "UInt::op_shr/large_shift" {
let x = 0xFF000000U
inspect(x >> 32, content="4278190080") // Same as x >> 0 due to masking
}
>> 16) (UInt, UInt) -> UInt
& 0xff).(self : UInt) -> Byte
Converts an unsigned 32-bit integer to a byte by taking its least significant
8 bits. Any bits beyond the first 8 bits are truncated.
Parameters:
self : The unsigned 32-bit integer to be converted. Only the least
significant 8 bits will be used.
Returns a byte containing the least significant 8 bits of the input integer.
Example:
test "UInt::to_byte" {
let n = 258U // In binary: 100000010
inspect(n.to_byte(), content="b'\\x02'") // Only keeps 00000010
let big = 4294967295U // Maximum value of UInt
inspect(big.to_byte(), content="b'\\xFF'") // Only keeps 11111111
}
to_byte()
241 FixedArray[Byte]
b(FixedArray[Byte], Int, Byte) -> Unit
Sets a value at the specified index in a fixed-size array. The original value
at that index is overwritten.
Parameters:
array : The fixed-size array to modify.
index : The position in the array where the value will be set.
value : The new value to assign at the specified index.
Throws a runtime error if the index is out of bounds (less than 0 or greater
than or equal to the length of the array).
Example:
test "FixedArray::op_set" {
let arr = [1, 2, 3]
arr[1] = 42
inspect(arr, content="[1, 42, 3]")
}
test "panic FixedArray::op_set/out_of_bounds" {
let arr = [1, 2, 3]
arr[3] = 42 // Index out of bounds
}
[offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 3] = ((UInt
value (self : UInt, shift : Int) -> UInt
Performs a logical right shift operation on an unsigned 32-bit integer. The
operation shifts all bits to the right by a specified number of positions,
filling the leftmost positions with zeros.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift right. If this value is
negative, the behavior is undefined. Values larger than 31 are masked with & 31.
Returns a new unsigned 32-bit integer containing the result of the right
shift operation.
Example:
test "UInt::op_shr" {
let x = 0xFF000000U
inspect(x >> 8, content="16711680") // 0x00FF0000
inspect(x >> 24, content="255") // 0x000000FF
}
test "UInt::op_shr/large_shift" {
let x = 0xFF000000U
inspect(x >> 32, content="4278190080") // Same as x >> 0 due to masking
}
>> 24) (UInt, UInt) -> UInt
& 0xff).(self : UInt) -> Byte
Converts an unsigned 32-bit integer to a byte by taking its least significant
8 bits. Any bits beyond the first 8 bits are truncated.
Parameters:
self : The unsigned 32-bit integer to be converted. Only the least
significant 8 bits will be used.
Returns a byte containing the least significant 8 bits of the input integer.
Example:
test "UInt::to_byte" {
let n = 258U // In binary: 100000010
inspect(n.to_byte(), content="b'\\x02'") // Only keeps 00000010
let big = 4294967295U // Maximum value of UInt
inspect(big.to_byte(), content="b'\\xFF'") // Only keeps 11111111
}
to_byte()
242}
243
244///|
245fn (b : FixedArray[Byte], offset : Int, value : UInt64) -> Unit
le_put_uint64(FixedArray[Byte]
b : type FixedArray[A]
FixedArray[Byte
Byte], Int
offset : Int
Int, UInt64
value : UInt64
UInt64) -> Unit
Unit {
246 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
b, Int
offset, (UInt64
value (self : UInt64, other : UInt64) -> UInt64
Performs a bitwise AND operation between two unsigned 64-bit integers.
Parameters:
self : The first unsigned 64-bit integer operand.
other : The second unsigned 64-bit integer operand.
Returns the result of performing a bitwise AND operation on the two operands.
Example:
test "UInt64::land" {
let a = 0xF0F0F0F0F0F0F0F0UL
let b = 0xFF00FF00FF00FF00UL
inspect(a & b, content="17294086455919964160") // 0xF000F000F000F000
}
& 0xffffffff).(self : UInt64) -> UInt
Converts a 64-bit unsigned integer to a 32-bit unsigned integer by truncating
the higher 32 bits.
Parameters:
self : The 64-bit unsigned integer to be converted.
Returns a 32-bit unsigned integer containing the lower 32 bits of the input
value.
Example:
test "UInt64::to_uint" {
let big = 0xFFFFFFFFFFFFFFFFUL // max value of UInt64
inspect(big.to_uint(), content="4294967295") // 0xFFFFFFFF, max value of UInt
let small = 42UL
inspect(small.to_uint(), content="42")
}
to_uint())
247 (b : FixedArray[Byte], offset : Int, value : UInt) -> Unit
le_put_uint32(FixedArray[Byte]
b, Int
offset (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ 4, ((UInt64
value (self : UInt64, shift : Int) -> UInt64
Performs a logical right shift operation on a 64-bit unsigned integer by a
specified number of bits. All bits shifted beyond the least significant bit
are discarded, and zeros are shifted in from the most significant bit.
Parameters:
self : The 64-bit unsigned integer to be shifted.
shift : The number of positions to shift right. Only the least
significant 6 bits of this value are used, effectively making the shift count
always between 0 and 63.
Returns a new UInt64 value representing the result of the right shift
operation.
Example:
test "UInt64::op_shr" {
let x = 0xFF00FF00FF00FF00UL
inspect(x >> 8, content="71777214294589695") // Shifted right by 8 bits
inspect(x >> 64, content="18374966859414961920") // Equivalent to x >> 0 due to masking
}
>> 32) (self : UInt64, other : UInt64) -> UInt64
Performs a bitwise AND operation between two unsigned 64-bit integers.
Parameters:
self : The first unsigned 64-bit integer operand.
other : The second unsigned 64-bit integer operand.
Returns the result of performing a bitwise AND operation on the two operands.
Example:
test "UInt64::land" {
let a = 0xF0F0F0F0F0F0F0F0UL
let b = 0xFF00FF00FF00FF00UL
inspect(a & b, content="17294086455919964160") // 0xF000F000F000F000
}
& 0xffffffff).(self : UInt64) -> UInt
Converts a 64-bit unsigned integer to a 32-bit unsigned integer by truncating
the higher 32 bits.
Parameters:
self : The 64-bit unsigned integer to be converted.
Returns a 32-bit unsigned integer containing the lower 32 bits of the input
value.
Example:
test "UInt64::to_uint" {
let big = 0xFFFFFFFFFFFFFFFFUL // max value of UInt64
inspect(big.to_uint(), content="4294967295") // 0xFFFFFFFF, max value of UInt
let small = 42UL
inspect(small.to_uint(), content="42")
}
to_uint())
248}
249
250///|
251fn (x : UInt, r : Int) -> UInt
rotl(UInt
x : UInt
UInt, Int
r : Int
Int) -> UInt
UInt {
252 (UInt
x (self : UInt, shift : Int) -> UInt
Performs a left shift operation on an unsigned 32-bit integer. Each bit in
the integer is shifted left by the specified number of positions, and zeros
are filled in from the right.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift. Only the least significant 5
bits are used, effectively making the shift count always between 0 and 31.
Returns a new unsigned 32-bit integer that is the result of shifting self
left by shift positions.
Example:
test "UInt::op_shl" {
let x = 1U
inspect(x << 3, content="8") // Binary: 1 -> 1000
let y = 0xFFFFFFFFU
inspect(y << 16, content="4294901760") // All bits after position 16 are discarded
}
<< Int
r) (UInt, UInt) -> UInt
| (UInt
x (self : UInt, shift : Int) -> UInt
Performs a logical right shift operation on an unsigned 32-bit integer. The
operation shifts all bits to the right by a specified number of positions,
filling the leftmost positions with zeros.
Parameters:
self : The unsigned 32-bit integer to be shifted.
shift : The number of positions to shift right. If this value is
negative, the behavior is undefined. Values larger than 31 are masked with & 31.
Returns a new unsigned 32-bit integer containing the result of the right
shift operation.
Example:
test "UInt::op_shr" {
let x = 0xFF000000U
inspect(x >> 8, content="16711680") // 0x00FF0000
inspect(x >> 24, content="255") // 0x000000FF
}
test "UInt::op_shr/large_shift" {
let x = 0xFF000000U
inspect(x >> 32, content="4278190080") // Same as x >> 0 due to masking
}
>> (32 (self : Int, other : Int) -> Int
Performs subtraction between two 32-bit integers, following standard two's
complement arithmetic rules. When the result overflows or underflows, it
wraps around within the 32-bit integer range.
Parameters:
self : The minuend (the number being subtracted from).
other : The subtrahend (the number to subtract).
Returns the difference between self and other.
Example:
test "Int::op_sub" {
let a = 42
let b = 10
inspect(a - b, content="32")
let max = 2147483647 // Int maximum value
inspect(max - -1, content="-2147483648") // Overflow case
}
- Int
r))
253}
254
255///|
256fn (v : Int) -> Char
to_hex(Int
v : Int
Int) -> Char
Char {
257 if Int
v (self_ : Int, other : Int) -> Bool
< 10 {
258 (Int) -> Char
Int::(self : Int) -> Char
unsafe_to_char(Int
v (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ b'0'.(self : Byte) -> Int
Converts a byte value to a 32-bit signed integer. The resulting integer will
have the same binary representation as the byte value, preserving the
numerical value in the range [0, 255].
Parameters:
byte : The byte value to be converted to an integer.
Returns a 32-bit signed integer representing the same numerical value as the
input byte.
Example:
test "Byte::to_int" {
let b = b'\xFF' // byte with value 255
inspect(b.to_int(), content="255")
let zero = b'\x00'
inspect(zero.to_int(), content="0")
}
to_int())
259 } else {
260 (Int) -> Char
Int::(self : Int) -> Char
unsafe_to_char(Int
v (self : Int, other : Int) -> Int
Performs subtraction between two 32-bit integers, following standard two's
complement arithmetic rules. When the result overflows or underflows, it
wraps around within the 32-bit integer range.
Parameters:
self : The minuend (the number being subtracted from).
other : The subtrahend (the number to subtract).
Returns the difference between self and other.
Example:
test "Int::op_sub" {
let a = 42
let b = 10
inspect(a - b, content="32")
let max = 2147483647 // Int maximum value
inspect(max - -1, content="-2147483648") // Overflow case
}
- 10 (self : Int, other : Int) -> Int
Adds two 32-bit signed integers. Performs two's complement arithmetic, which
means the operation will wrap around if the result exceeds the range of a
32-bit integer.
Parameters:
self : The first integer operand.
other : The second integer operand.
Returns a new integer that is the sum of the two operands. If the
mathematical sum exceeds the range of a 32-bit integer (-2,147,483,648 to
2,147,483,647), the result wraps around according to two's complement rules.
Example:
test "Int::op_add" {
inspect(42 + 1, content="43")
inspect(2147483647 + 1, content="-2147483648") // Overflow wraps around to minimum value
}
+ b'a'.(self : Byte) -> Int
Converts a byte value to a 32-bit signed integer. The resulting integer will
have the same binary representation as the byte value, preserving the
numerical value in the range [0, 255].
Parameters:
byte : The byte value to be converted to an integer.
Returns a 32-bit signed integer representing the same numerical value as the
input byte.
Example:
test "Byte::to_int" {
let b = b'\xFF' // byte with value 255
inspect(b.to_int(), content="255")
let zero = b'\x00'
inspect(zero.to_int(), content="0")
}
to_int())
261 }
262}
263
264///|
265test "le_uint32 works" {
266 let Array[(FixedArray[Byte], UInt)]
tests = [
267 (type FixedArray[A]
FixedArray::(array : Array[Byte]) -> FixedArray[Byte]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([b'\x00', b'\x00', b'\x00', b'\x00']), 0U),
268 (type FixedArray[A]
FixedArray::(array : Array[Byte]) -> FixedArray[Byte]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([b'\x80', b'\x00', b'\x00', b'\x00']), 128U),
269 (type FixedArray[A]
FixedArray::(array : Array[Byte]) -> FixedArray[Byte]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([b'\x00', b'\x01', b'\x00', b'\x00']), 256U),
270 (type FixedArray[A]
FixedArray::(array : Array[Byte]) -> FixedArray[Byte]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([b'\x00', b'\x00', b'\x00', b'\x01']), 16777216U),
271 (type FixedArray[A]
FixedArray::(array : Array[Byte]) -> FixedArray[Byte]
Creates a new fixed-size array from a dynamic array. The resulting fixed
array will have the same length and elements as the input array.
Parameters:
array : A dynamic array containing elements of type T that will be
converted to a fixed array.
Returns a new fixed array containing the same elements as the input array.
Example:
test "FixedArray::from_array" {
let dynamic_array = [1, 2, 3, 4, 5]
let fixed_array = FixedArray::from_array(dynamic_array)
inspect(fixed_array, content="[1, 2, 3, 4, 5]")
}
from_array([b'\x12', b'\x34', b'\x56', b'\x78']), 0x78563412U),
272 ]
273 for (FixedArray[Byte], UInt)
tt in Array[(FixedArray[Byte], UInt)]
tests {
274 let UInt
got = (b : FixedArray[Byte], offset : Int) -> UInt
le_uint32((FixedArray[Byte], UInt)
tt.FixedArray[Byte]
0, 0)
275 (a : UInt, b : UInt, loc~ : SourceLoc = _) -> Unit!Error
Asserts that two values are equal. If they are not equal, raises a failure
with a message containing the source location and the values being compared.
Parameters:
a : First value to compare.
b : Second value to compare.
loc : Source location information to include in failure messages. This is
usually automatically provided by the compiler.
Throws a Failure error if the values are not equal, with a message showing
the location of the failing assertion and the actual values that were
compared.
Example:
test "assert_eq" {
assert_eq(1, 1)
assert_eq("hello", "hello")
}
test "panic assert_eq/not_equal" {
ignore(assert_eq(1, 2)) // Will fail with message showing values and location
}
assert_eq!(UInt
got, (FixedArray[Byte], UInt)
tt.UInt
1)
276 }
277}
278