diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-05-08 01:09:50 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-05-08 01:09:50 +0200 |
commit | d19b9b19017f093abb5161227f32551e9f380567 (patch) | |
tree | a8cb11c315b00e1a1a4034edef0e9d891b91a9cb /gmpxx.h | |
parent | 589ebae04861335c79ee183ffeb239a06c19923a (diff) | |
download | gmp-d19b9b19017f093abb5161227f32551e9f380567.tar.gz |
* gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.
Diffstat (limited to 'gmpxx.h')
-rw-r--r-- | gmpxx.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -266,10 +266,7 @@ struct __gmp_binary_minus static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { mpz_sub_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) - { - mpz_sub_ui(z, w, l); - mpz_neg(z, z); - } + { mpz_ui_sub(z, l, w); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { if (l >= 0) @@ -280,10 +277,12 @@ struct __gmp_binary_minus static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { if (l >= 0) - mpz_sub_ui(z, w, l); + mpz_ui_sub(z, l, w); else - mpz_add_ui(z, w, -l); - mpz_neg(z, z); + { + mpz_add_ui(z, w, -l); + mpz_neg(z, z); + } } static void eval(mpz_ptr z, mpz_srcptr w, double d) { |