[GiNaC-list] Bug in numer_denom?

Ernst Moritz Hahn emh at cs.uni-sb.de
Sun Nov 21 19:49:55 CET 2010


Hi all,

one user of my tool which uses GiNaC sent me a debug output where the
problem that (non-integer) rational numbers appear in numerator or
denumerator of numer_denom(...) also occurs in the development version.

Is this example of use? Should I send it to the mailing list or to one
of the authors? Again, it is quite large.

Best regards,
Moritz

Am Thursday, den 18.11.2010, 22:50 +0100 schrieb Richard B. Kreckel:
> Hi!
> 
> On 11/18/2010 04:55 PM, Alexei Sheplyakov wrote:
> >> On 11/10/2010 04:22 PM, Ernst Moritz Hahn wrote:
> >>> Using git version of GiNaC, I get "out-git.txt". Here, braces are
> >>> used in numerator and
> >>> denominator, which also seems strange to me.
> >
> > Braces are OK. numer_denom returns a list consisting of numerator and
> > denominator, and GiNaC prints lists as { element0, element1, ... elementN }.
> 
> Both results in the original post contained exactly one pair of curly 
> *braces*: They were both of the form {N, D}. I assume he meant round 
> *parenthesis*, of which there are many since edf1ae46a92 was committed.
> 
> > (there might be some more bugs in GCD code).
> 
> Sorry, I see now that you are right. The old and new computed numerators 
> differ by a factor 282901891126422365/highA. That factor certainly 
> shouldn't contain a highA. Also, computing the GCD of the original A and 
> B segfaults over here.
> 
> Cheers
>    -richy.




More information about the GiNaC-list mailing list