summaryrefslogtreecommitdiff
path: root/gmpxx.h
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-07-24 01:37:21 +0200
committerKevin Ryde <user42@zip.com.au>2003-07-24 01:37:21 +0200
commitd3d5c773a3773c3b98e52b10d81dd283098ab746 (patch)
treeeeb551850cd8a0865e6dfbedd7c8edd091ca4789 /gmpxx.h
parentd5e621103062a31c5f312be99b3b88004ad59a14 (diff)
downloadgmp-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.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/gmpxx.h b/gmpxx.h
index a270bf80c..231f243cd 100644
--- a/gmpxx.h
+++ b/gmpxx.h
@@ -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;