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) > > With sympy one gets: > > >>> sqrt(3)/sqrt(15) > sqrt(5)/5 > > The reason I am asking is that we are designing a very fast core in > C++ (https://github.com/sympy/csympy) and so far we can't figure out a > fast way to do the full SymPy like simplification. The rule for Sage > (GiNaC?) simplification seems to be: convert expressions of the form > 1/sqrt(2), 1/sqrt(15) into 1/2*sqrt(2), 1/15*sqrt(15), then collect > all integers, and leave the square roots as is, i.e. do not attempt > any integer factorization (in or outside of the square root). This we > know how to implement fast I think. > > So I would like to know which function you can later use to do the > full simplification. > And also if you run into any issues with the current Sage behavior (I > used Sage Version 6.2.rc2, Release Date: 2014-05-04). > > Many thanks for any feedback, > Ondrej > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.