You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functions fairly handy if you have to work with relatively small numbers since you will not have to allocate
2285
2285
an entire mp\_int to store a number like $1$ or $2$.
2286
2286
2287
+
The functions \texttt{mp\_incr} and \texttt{mp\_decr} mimic the postfix operators \texttt{++} and \texttt{--} respectively, to increment the input by one. They call the full single-digit functions if the addition would carry. Both functions need to be included in a minimized library because they call each other in case of a negative input, These functions change the inputs!
2288
+
\begin{alltt}
2289
+
int mp_incr(mp_int *a);
2290
+
int mp_decr(mp_int *a);
2291
+
\end{alltt}
2292
+
2287
2293
2288
2294
The division by three can be made faster by replacing the division with a multiplication by the multiplicative inverse of three.
0 commit comments