Documentation of `gcry_mpi_div' function's `round' argument

Arun Isaac arunisaac at systemreboot.net
Wed Nov 15 22:47:09 CET 2017


>> What does `round' do? Is it to indicate that the quotient should be
>> rounded to the nearest integer? A little bit more clarity in the
>> documentation would be nice.
>
> Thanks for noting.  I changed it to:
>
>  -- Function: void gcry_mpi_div (gcry_mpi_t Q, gcry_mpi_t R,
>           gcry_mpi_t DIVIDEND, gcry_mpi_t DIVISOR, int ROUND)
>
>      Q = DIVIDEND / DIVISOR, R = DIVIDEND \bmod DIVISOR.  Q and R may be
>      passed as 'NULL'.  ROUND is either negative for floored division
>      (rounds towards the next lower integer) or zero for truncated
>      division (rounds towards zero).

That's clearer. Thanks!



More information about the Gcrypt-devel mailing list