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

Werner Koch wk at
Wed Nov 15 20:37:18 CET 2017

On Wed, 15 Nov 2017 17:49, arunisaac at said:

> 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).



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the Gcrypt-devel mailing list