Skip to content

Commit

Permalink
Fix doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chiphogg committed Nov 8, 2024
1 parent ab524dc commit 36da93c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion au/code/au/utility/mod.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace au {
namespace detail {

// (a * b) % n
// (a + b) % n
//
// Precondition: (a < n).
// Precondition: (b < n).
Expand All @@ -33,6 +33,7 @@ constexpr uint64_t add_mod(uint64_t a, uint64_t b, uint64_t n) {
}

// (a - b) % n
//
// Precondition: (a < n).
// Precondition: (b < n).
constexpr uint64_t sub_mod(uint64_t a, uint64_t b, uint64_t n) {
Expand All @@ -44,6 +45,7 @@ constexpr uint64_t sub_mod(uint64_t a, uint64_t b, uint64_t n) {
}

// (a * b) % n
//
// Precondition: (a < n).
// Precondition: (b < n).
constexpr uint64_t mul_mod(uint64_t a, uint64_t b, uint64_t n) {
Expand All @@ -68,6 +70,7 @@ constexpr uint64_t mul_mod(uint64_t a, uint64_t b, uint64_t n) {
}

// (a / 2) % n
//
// Precondition: (a < n).
// Precondition: (n is odd).
constexpr uint64_t half_mod_odd(uint64_t a, uint64_t n) {
Expand Down

0 comments on commit 36da93c

Please sign in to comment.