From bfc1db42872f0afc735ca3f6c49fbc62b57abdd0 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Tue, 10 Jul 2001 01:32:58 +0200 Subject: * mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on i386 gcc 2.95.x), remove a bogus comment about quotient. --- mpz/tdiv_ui.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/mpz/tdiv_ui.c b/mpz/tdiv_ui.c index 8e9929e4a..c08ed6707 100644 --- a/mpz/tdiv_ui.c +++ b/mpz/tdiv_ui.c @@ -1,5 +1,4 @@ -/* mpz_tdiv_ui(dividend, divisor_limb) - -- Return DIVDEND mod DIVISOR_LIMB. +/* mpz_tdiv_ui(dividend, divisor_limb) -- Return DIVDEND mod DIVISOR_LIMB. Copyright 1991, 1993, 1994, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. @@ -27,21 +26,9 @@ MA 02111-1307, USA. */ unsigned long int mpz_tdiv_ui (mpz_srcptr dividend, unsigned long int divisor) { - mp_size_t dividend_size; - mp_size_t size; - mp_limb_t remainder_limb; - if (divisor == 0) DIVIDE_BY_ZERO; - dividend_size = dividend->_mp_size; - size = ABS (dividend_size); - - /* No need for temporary allocation and copying if QUOT == DIVIDEND as - the divisor is just one limb, and thus no intermediate remainders - need to be stored. */ - - remainder_limb = mpn_mod_1 (dividend->_mp_d, size, (mp_limb_t) divisor); - - return remainder_limb; + return mpn_mod_1 (PTR(dividend), (mp_size_t) ABSIZ(dividend), + (mp_limb_t) divisor); } -- cgit v1.2.1