Skip to content

Commit 7717abc

Browse files
authored
Update modular_inverse_fermat_little_theorem.cpp
1 parent b87c713 commit 7717abc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

math/modular_inverse_fermat_little_theorem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
* a^{m-2} &≡& a^{-1} \;\text{mod}\; m
3131
* \f}
3232
*
33-
* We will find the exponent using binary exponentiation. Such that the
34-
* algorithm works in \f$O(\log m)\f$ time.
33+
* We will find the exponent using binary exponentiation such that the
34+
* algorithm works in logarithmic time.
3535
*
3636
* Examples: -
3737
* * a = 3 and m = 7
@@ -58,7 +58,7 @@ namespace math {
5858
*/
5959
namespace modular_inverse_fermat {
6060
/**
61-
* @brief Calculate exponent with modulo using binary exponentiation.
61+
* @brief Calculate exponent with modulo using binary exponentiation in \f$O(\log b)\f$ time.
6262
* @param a The base
6363
* @param b The exponent
6464
* @param m The modulo

0 commit comments

Comments
 (0)