Re: [sage-devel] Re: How to simplify square roots

2014-06-30 Thread rjf
On Monday, June 30, 2014 10:24:39 AM UTC-7, William wrote: > > On Mon, Jun 30, 2014 at 9:29 AM, Ondřej Čertík > wrote: > > Thanks Volker for the tip, that does the job. More comments below: > > Another comment. Evidently Sage uses **Maxima** for > rational_simplify, hence the integer factori

Re: [sage-devel] Re: How to simplify square roots

2014-06-30 Thread Ondřej Čertík
On Mon, Jun 30, 2014 at 11:23 AM, William Stein wrote: > On Mon, Jun 30, 2014 at 9:29 AM, Ondřej Čertík > wrote: >> Thanks Volker for the tip, that does the job. More comments below: > > Another comment. Evidently Sage uses **Maxima** for > rational_simplify, hence the integer factorization tha

Re: [sage-devel] Re: How to simplify square roots

2014-06-30 Thread William Stein
On Mon, Jun 30, 2014 at 9:29 AM, Ondřej Čertík wrote: > Thanks Volker for the tip, that does the job. More comments below: Another comment. Evidently Sage uses **Maxima** for rational_simplify, hence the integer factorization that is required to do this is not-surprisingly insanely stupidly slow

Re: [sage-devel] Re: How to simplify square roots

2014-06-30 Thread Ondřej Čertík
Thanks Volker for the tip, that does the job. More comments below: On Sun, Jun 29, 2014 at 11:52 PM, John Cremona wrote: > Be careful though: > > sage: (sqrt(-2)*sqrt(-3)).simplify_radical() > -sqrt(3)*sqrt(2) > > i.e. you cannot use sqrt(a)*sqrt(b)=sqrt(a*b) everywhere without > reaching a contr

Re: [sage-devel] Re: How to simplify square roots

2014-06-30 Thread kcrisman
On Monday, June 30, 2014 1:52:50 AM UTC-4, John Cremona wrote: > > Be careful though: > > sage: (sqrt(-2)*sqrt(-3)).simplify_radical() > -sqrt(3)*sqrt(2) > > i.e. you cannot use sqrt(a)*sqrt(b)=sqrt(a*b) everywhere without > reaching a contradiction. > > sage: bool( (sqrt(-2)*sqrt(-3)) == sq

Re: [sage-devel] Re: How to simplify square roots

2014-06-29 Thread John Cremona
Be careful though: sage: (sqrt(-2)*sqrt(-3)).simplify_radical() -sqrt(3)*sqrt(2) i.e. you cannot use sqrt(a)*sqrt(b)=sqrt(a*b) everywhere without reaching a contradiction. sage: bool( (sqrt(-2)*sqrt(-3)) == sqrt(2)*sqrt(3) ) False On 30 June 2014 04:31, Volker Braun wrote: > sage: sqrt(3)/sqrt

[sage-devel] Re: How to simplify square roots

2014-06-29 Thread Volker Braun
sage: sqrt(3)/sqrt(15) 1/15*sqrt(15)*sqrt(3) sage: _.radical_simplify() 1/5*sqrt(5) On Sunday, June 29, 2014 11:22:50 PM UTC-4, Ondřej Čertík wrote: > > Hi, > > How do I simplify the following: > > sage: sqrt(3)/sqrt(15) > 1/15*sqrt(15)*sqrt(3) > sage: simplify(_) > 1/15*sqrt(15)*sqrt(3) >