diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-07-24 01:37:21 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-07-24 01:37:21 +0200 |
commit | d3d5c773a3773c3b98e52b10d81dd283098ab746 (patch) | |
tree | eeb551850cd8a0865e6dfbedd7c8edd091ca4789 /gmpxx.h | |
parent | d5e621103062a31c5f312be99b3b88004ad59a14 (diff) | |
download | gmp-d3d5c773a3773c3b98e52b10d81dd283098ab746.tar.gz |
* gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si for
mpz*long and long*mpz.
Diffstat (limited to 'gmpxx.h')
-rw-r--r-- | gmpxx.h | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -413,25 +413,9 @@ struct __gmp_binary_multiplies static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { mpz_mul_ui(z, w, l); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) - { - if (l >= 0) - mpz_mul_ui(z, w, l); - else - { - mpz_mul_ui(z, w, -l); - mpz_neg(z, z); - } - } + { mpz_mul_si (z, w, l); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) - { - if (l >= 0) - mpz_mul_ui(z, w, l); - else - { - mpz_mul_ui(z, w, -l); - mpz_neg(z, z); - } - } + { mpz_mul_si (z, w, l); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; |