#10284: Infinite loop in gcd() via pynac-0.2.1
-------------------------+--------------------------------------------------
Reporter: bgoodri | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: symbolics | Keywords: gcd
Author: | Upstream: Fixed upstream, in a later stable
release.
Reviewer: | Merged:
Work_issues: |
-------------------------+--------------------------------------------------
Comment(by bgoodri):
Replying to [comment:1 burcin]:
All valid points. Maybe we should move the discussion to sage-devel to get
more input?
If you want a quick hack fix for this particular bug, I think it would
suffice to add some logic to py_gcd to coerce rational expressions with a
.polynomial(QQ) and call gcd() from
sage/rings/polynomial/multi_polynomial_libsingular instead of gcd() from
sage/rings/arith . I tried that a couple of days ago and it was
insufficient to fix #10268, but it would presumably fix this bug. Not that
#10268 is a killer feature but GiNaC does seem to have a significant speed
advantage over Maxima at simplifying rationals.
As for the more general GiNaC / pynac vs. Singular / Factory comparison
(not to mention giac), I haven't investigated enough to have a super
strong opinion about it. I agree it would be easier to maintain if there
were only one interface. On the other hand, it is good to make it possible
to use whatever might be fastest and have the most features for a
particular problem. Also, in both cases, we are lagging behind upstream,
but they have a lot of the same algorithms now. Singular 3.1-2 fixed /
improved a lot of multivariate polynomial stuff but sage currently ships
with 3.0-something. Similarly, GiNaC 1.5.8 fixed this bug and 1.5.0 added
a lot of functionality in the polynomials/ directory, but pynac is based
on 1.4-something.
What I like about (the latest) GiNaC is that it is closer to the sage SR
concept, whereas Singular is more literal about its rings. For example,
you can do this
{{{
goodr...@y560:/tmp$ ginsh
ginsh - GiNaC Interactive Shell (ginac V1.5.8)
__, _______ Copyright (C) 1999-2010 Johannes Gutenberg University
Mainz,
(__) * | Germany. This is free software with ABSOLUTELY NO
WARRANTY.
._) i N a C | You are welcome to redistribute it under certain
conditions.
<-------------' For details type `warranty;'.
Type ?? for a list of help topics.
> f = Pi^2 - 1;
-1+Pi^2
> g = Pi + 1;
1+Pi
> normal(f/g);
-1+Pi
> quit;
}}}
and similarly with other transcendental numbers and trig and so forth.
AFAIK, Singular would throw an error about QQness instead of determining
that Pi - 1 was the greatest common factor.
There is a lot to like about Singular too, which is probably why William
wrote those things in TODO.txt and the docstrings. Some of that seems to
have changed in the last couple of years though.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10284#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.