[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
Hi! Sorry to bother you again, but there still is a change that I don't understand. It is about two doctests in sage.stats, where the expected output has become a different but equivalent expression. It boils down to a change in the minus sign distribution of symbolic expressions, as below. The d

[sage-devel] Re: trac.sagemath.org keeps saying that I'm not logged in

2011-02-15 Thread Eviatar
Try clearing your cache and cookies (should be Ctrl+Shift+Delete on most browsers). -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.

[sage-devel] Re: Rapid growth in Python popularity

2011-02-15 Thread Eviatar
Here is the data: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.

[sage-devel] Rapid growth in Python popularity

2011-02-15 Thread Eviatar
Hello, I have been monitoring TIOBE, a programming language popularity index. Python has been experiencing extremely fast growth in the last few months, rising to fourth place from seventh in a year, just behind Java, C, and C++. It has also experienced the most increase in popularity of any langu

[sage-devel] Comparison of Integer & numpy.int32 fails... but not always?

2011-02-15 Thread Maxim
Hello everyone, I'd like to know if it is required practice to cast the types of the objects being compared or if Sage should be able to deal with it automatically? Because I have a problem where I need to explicitely cast an numpy.int32 vector unit for the comparison with a Sage Integer to be re

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
Hi kcrisman, On 15 Feb., 21:12, kcrisman wrote: > Burcin or someone else who understands more about this (I see Mike > responded as well) would have to say.  I think the real issue is that > we'd like to have consistency in representation, and in particular > that certain doctests don't fail wher

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread kcrisman
> Question: > Is it a problem if (-sqrt(2)-1/5*I)^2 returns 1/25*(-5*sqrt(2) - I)^2, > i.e., if the minus sign is not pulled out? > If it is, then please explain in what part of the code the minus sign > is supposed to be pulled out. > Burcin or someone else who understands more about this (I see

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
On 15 Feb., 19:20, Simon King wrote: > I think a segfault caused by a different choice of a gcd is nasty and > probably a bug. But I guess Ginac is beyond my understanding. I don't know if there is a bug in Ginac hidden (Ginac people may contact me if they feel like hunting that issue down), but

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
Dear Mike and kcrisman, Thank you for providing me with some pointers! On 15 Feb., 17:29, kcrisman wrote: > ... > So it is using the Ginac gcd, and calling it 'g_gcd'.  And all of that > is in a call > > cdef extern from "ginac_wrap.h": > > which lives in devel/sage/c_lib/include.    I understan

[sage-devel] Re: Bundle different objects

2011-02-15 Thread Dox
Any other contribution? -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread kcrisman
On Feb 15, 10:59 am, Simon King wrote: > On 15 Feb., 16:37, Simon King wrote: > > > Yep: > > sage: a = SR(-1) > > sage: b = SR(-1/5) > > sage: sage.rings.arith.gcd(a,b) > > 1  # or 1/5 with my patch. > > No, I was mistaken. Everything can be traced back to g_gcd, which is > called in sage.symbo

Re: [sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Mike Hansen
On Tue, Feb 15, 2011 at 4:59 PM, Simon King wrote: > No, I was mistaken. Everything can be traced back to g_gcd, which is > called in sage.symbolic.expression.Expression.gcd. At that point, I > lost track: I can not find the code of g_gcd (even "grep g_gcd" does > not give me a hint). In particula

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
On 15 Feb., 16:37, Simon King wrote: > Yep: > sage: a = SR(-1) > sage: b = SR(-1/5) > sage: sage.rings.arith.gcd(a,b) > 1  # or 1/5 with my patch. No, I was mistaken. Everything can be traced back to g_gcd, which is called in sage.symbolic.expression.Expression.gcd. At that point, I lost track: I

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
On 15 Feb., 16:34, Simon King wrote: > Thank you! I guess this is it! Namely, I changed sage.rings.arith.gcd. Yep: sage: a = SR(-1) sage: b = SR(-1/5) sage: sage.rings.arith.gcd(a,b) 1 # or 1/5 with my patch. However, if a different choice of a gcd can result in a segfault then I think there is

[sage-devel] gcd and dividing polynomials / clearing denominators

2011-02-15 Thread Volker Braun
Is this the intended behaviour? First, for an ordinary polynomial ring: sage: R0. = QQ[] sage: (x*y)/x y sage: _.parent() Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field sage: R0((x*y)/x) y sage: _.parent() Multivariate Polynomial Ring in x, y over Rational Field kind o

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
Hi! On 15 Feb., 16:23, kcrisman wrote: > ... > Hence in symbolic/pynac.pyx we have the following: > > # > # GCD > # > import sage.rings.arith > cdef public object py_gcd

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
On 15 Feb., 15:50, Simon King wrote: > To symbolists: > Please tell me whether (and how) gcd or lcm occur in > new_Expression_from_GEx, or at least show me the code! I also found that the gcd method of symbolic expressions was (indirectly) changed by my patch, but again, I can't find the code: s

[sage-devel] Re: Help with understanding multiplication of symbolic expressions

2011-02-15 Thread kcrisman
On Feb 15, 9:50 am, Simon King wrote: > Hi! > > Working on #10771 (making gcd and lcm work nicer), I got trouble with > the multiplication of symbolic expressions. The problem seems to boil > down to examples of the following type: > > Without the patch > sage: x = -sqrt(2)-1/5*I > sage: x*x > 1

[sage-devel] Help with understanding multiplication of symbolic expressions

2011-02-15 Thread Simon King
Hi! Working on #10771 (making gcd and lcm work nicer), I got trouble with the multiplication of symbolic expressions. The problem seems to boil down to examples of the following type: Without the patch sage: x = -sqrt(2)-1/5*I sage: x*x 1/25*(5*sqrt(2) + I)^2 With the patch sage: x = -sqrt(2)-1/

[sage-devel] Re: Signature of a permutation

2011-02-15 Thread Dox
Wow! A lot of answers! Thank you everyone, :-) nice to see so much different contributions! Dox -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at

[sage-devel] ticket 10712: adding #long time to doctests

2011-02-15 Thread Jeroen Demeyer
Can somebody please review ticket #10712? It's about adding "# long time" to various doctests, and also rewriting a few doctests taking an excessive time. Thanks, Jeroen. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sag

[sage-devel] problems with discriminants and resultants

2011-02-15 Thread mmarco
I have been trying to prepare a class on algebraic geometry, and make some exercises (involving resultants and discriminants of polynomials) in sage. I have noticed the following: 1) Discriminant is not defined for multivariate polynomial rings (handled by libsingular), they could be easily imple