[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:52:48 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 49537117f2fc2e0d104ea03806362857cc858cf1
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Wed Feb 8 15:59:35 2012 +0100

    fix from spielwiese: simplifying numbers in nlInpAdd

diff --git a/kernel/longrat.cc b/kernel/longrat.cc
index 41e035e..ae61e6d 100644
--- a/kernel/longrat.cc
+++ b/kernel/longrat.cc
@@ -24,8 +24,13 @@
 static inline number nlShort3(number x) // assume x->s==3
 {
   assume(x->s==3);
-  if ((mpz_cmp_ui(x->z,(long)0)==0)
-  || (mpz_size1(x->z)<=MP_SMALL))
+  if (mpz_cmp_ui(x->z,(long)0)==0)
+  {
+    mpz_clear(x->z);
+    FREE_RNUMBER(x);
+    return INT_TO_SR(0);
+  }
+  if(mpz_size1(x->z)<=MP_SMALL)
   {
     LONG ui=mpz_get_si(x->z);
     if ((((ui<<3)>>3)==ui)

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list