diff --git a/src/data_structures/src/bit_array.cairo b/src/data_structures/src/bit_array.cairo index 6c89bc99..57a863d3 100644 --- a/src/data_structures/src/bit_array.cairo +++ b/src/data_structures/src/bit_array.cairo @@ -64,19 +64,19 @@ trait BitArrayTrait { fn read_word_be_u512(ref self: BitArray, length: usize) -> Option; /// Writes the bits of the specified length from `word` onto the BitArray /// in big endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `felt252` /// `length` - The length of the word in bits, maximum 248 fn write_word_be(ref self: BitArray, word: felt252, length: usize); /// Writes the bits of the specified length from `word` onto the BitArray /// in big endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `u256` /// `length` - The length of the word in bits, maximum 256 fn write_word_be_u256(ref self: BitArray, word: u256, length: usize); /// Writes the bits of the specified length from `word` onto the BitArray /// in big endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `u512` /// `length` - The length of the word in bits, maximum 512 fn write_word_be_u512(ref self: BitArray, word: u512, length: usize); @@ -102,19 +102,19 @@ trait BitArrayTrait { fn read_word_le_u512(ref self: BitArray, length: usize) -> Option; /// Writes the bits of the specified length from `word` onto the BitArray /// in little endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `felt252` /// `length` - The length of the word in bits, maximum 248 fn write_word_le(ref self: BitArray, word: felt252, length: usize); /// Writes the bits of the specified length from `word` onto the BitArray /// in little endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `u256` /// `length` - The length of the word in bits, maximum 256 fn write_word_le_u256(ref self: BitArray, word: u256, length: usize); /// Writes the bits of the specified length from `word` onto the BitArray /// in little endian representation - /// # Arguemnts + /// # Arguments /// `word` - The value to store onto the bit array of type `u512` /// `length` - The length of the word in bits, maximum 512 fn write_word_le_u512(ref self: BitArray, word: u512, length: usize); diff --git a/src/data_structures/src/byte_reader.cairo b/src/data_structures/src/byte_reader.cairo index e41e48a4..daed23d6 100644 --- a/src/data_structures/src/byte_reader.cairo +++ b/src/data_structures/src/byte_reader.cairo @@ -12,7 +12,7 @@ trait ByteReader { /// # Returns /// * `ByteReader` - The reader struct wrapping a read-only snapshot of this ByteArray fn reader(self: @T) -> ByteReaderState; - /// Checks that there are enoguh remaining bytes available + /// Checks that there are enough remaining bytes available /// # Arguments /// * `at` - the start index position of the byte data /// * `count` - the number of bytes required diff --git a/src/math/README.md b/src/math/README.md index b1f574d3..faddd72f 100644 --- a/src/math/README.md +++ b/src/math/README.md @@ -12,7 +12,7 @@ The `is_power_of_two` algorithm is used to determine whether a given positive in The trigonometric functions are a set of mathematical functions that relate the angles of a triangle to the lengths of its sides. The most common trigonometric functions are sine, cosine, and tangent. These functions are used in many areas of mathematics, including geometry, calculus, and statistics. They are also used in physics, engineering, and other sciences. -Fast trigonometric functions are computational and spacial efficient, with minor errors compared to the standard trigonometric functions. Refer to http://hevi.info/tag/fast-sine-function/ for detailed information. +Fast trigonometric functions are computational and spatial efficient, with minor errors compared to the standard trigonometric functions. Refer to http://hevi.info/tag/fast-sine-function/ for detailed information. ## [Is Prime](./src/is_prime.cairo) diff --git a/src/math/src/karatsuba.cairo b/src/math/src/karatsuba.cairo index d3e347ce..a76057a7 100644 --- a/src/math/src/karatsuba.cairo +++ b/src/math/src/karatsuba.cairo @@ -40,7 +40,7 @@ fn div_half_ceil(num: u128) -> u128 { /// Helper function for 'multiply',splits a number at the indicated index and returns it in a tuple. /// # Arguments -/// * `num` - The current value to be splited. +/// * `num` - The current value to be split. /// * `split_idx` - Index at which the number will be split /// # Returns /// * `(u128, u128)` -tuple representing the split number. diff --git a/src/math/src/mod_arithmetics.cairo b/src/math/src/mod_arithmetics.cairo index 22ec60d5..32cb7b8c 100644 --- a/src/math/src/mod_arithmetics.cairo +++ b/src/math/src/mod_arithmetics.cairo @@ -45,13 +45,13 @@ fn add_inverse_mod(b: u256, modulo: u256) -> u256 { modulo - b } -/// Function that performs modular substraction. +/// Function that performs modular subtraction. /// # Arguments -/// * `a` - Left hand side of substraction. -/// * `b` - Right hand side of substraction. +/// * `a` - Left hand side of subtraction. +/// * `b` - Right hand side of subtraction. /// * `modulo` - modulo. /// # Returns -/// * `u256` - result of modular substraction +/// * `u256` - result of modular subtraction #[inline(always)] fn sub_mod(mut a: u256, mut b: u256, modulo: u256) -> u256 { // reduce values