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

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


On Wed, 15 Nov 2017 17:49, arunisaac at systemreboot.net 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).


Shalom-Salam,

   Werner

-- 
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: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20171115/0a043248/attachment.sig>


More information about the Gcrypt-devel mailing list