summaryrefslogtreecommitdiff
path: root/mpz/tdiv_qr_ui.c
diff options
context:
space:
mode:
authortege <tege@gmplib.org>1998-05-05 01:47:03 +0200
committertege <tege@gmplib.org>1998-05-05 01:47:03 +0200
commitb7dc3eeb264481185d60a22a59cf187c6a974d8b (patch)
tree7bd7da9350fa8c103e4041ca49650710059c7ec0 /mpz/tdiv_qr_ui.c
parent56d1f8704f7190ab52199af76decd98b81841ea3 (diff)
downloadgmp-b7dc3eeb264481185d60a22a59cf187c6a974d8b.tar.gz
Return the remainder.
Diffstat (limited to 'mpz/tdiv_qr_ui.c')
-rw-r--r--mpz/tdiv_qr_ui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mpz/tdiv_qr_ui.c b/mpz/tdiv_qr_ui.c
index 411243261..96633124c 100644
--- a/mpz/tdiv_qr_ui.c
+++ b/mpz/tdiv_qr_ui.c
@@ -24,7 +24,7 @@ MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
-void
+unsigned long int
#if __STDC__
mpz_tdiv_qr_ui (mpz_ptr quot, mpz_ptr rem, mpz_srcptr dividend, unsigned long int divisor)
#else
@@ -71,4 +71,6 @@ mpz_tdiv_qr_ui (quot, rem, dividend, divisor)
/* The quotient is SIZE limbs, but the most significant might be zero. */
size -= size != 0 && quot_ptr[size - 1] == 0;
quot->_mp_size = dividend_size >= 0 ? size : -size;
+
+ return remainder_limb;
}