axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [Enhanced Fraction Domain] Update gcl.patch


From: unknown
Subject: [Axiom-developer] [Enhanced Fraction Domain] Update gcl.patch
Date: Mon, 13 Jun 2005 14:37:38 -0500

Changes 
http://page.axiom-developer.org/zope/mathaction/EnhancedFractionDomain/diff
--
About (* -2147483648/2203319546073 4926328811737/4294967296) bug, -2147483648 
is the MOST-NEGATIVE-FIXNUM. If we negate it, it become a bignum
and it is handled differently.
</br>
This new patch (for gcl-2.6.6) fix this bug.
For old gcl,  edit the old gcl.patch and change
<pre>
  if (type_of(y)==t_fixnum && type_of(x)==t_fixnum) 
    return make_fixnum(fix(x)/fix(y)); /* no in_place for fixnums as could be 
small */;
</pre>
to
<pre>
  if (type_of(x)==t_fixnum){
    if (type_of(y)==t_fixnum)
       return make_fixnum(fix(x)/fix(y)); /* no in_place for fixnums as could 
be small */;
    // ABS (MOST-NEGATIVE-FIXNUM) => BIGNUM
    return make_fixnum(-1);
  }
</pre>
in integer_exact_quotient function.
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]