Changes between Version 1 and Version 2 of Ticket #9880


Ignore:
Timestamp:
09/29/10 14:10:17 (11 years ago)
Author:
jpflori
Comment:

The bug happened because of the comparison functions which are used in a call to std::sort.

I have finally looked at the comparison functions and exchanging :

cmpval = seq[0].coeff.compare(other.exponent);

by

cmpval = -seq[0].coeff.compare(other.exponent);

in mul::compare_pow (mul.cpp:1265) seems to prevent the above bug from happening.

It seems to fit better with the change made by William Stein in power::compare_same_type (power.cpp:951).

However it doesn't mean the problem is completely solved...

I'll try to take a deeper look at the comparison functions at some point.

I tested the above fix with pynac 0.2.1.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9880 – Description

    v1 v2  
    1313P.expand()
    1414}}}
    15 
    16 This is already being discussed here:
    17 http://groups.google.com/group/sage-support/browse_thread/thread/7c85f02c76012722
     15This is already being discussed here: http://groups.google.com/group/sage-support/browse_thread/thread/7c85f02c76012722