On Dec 10, 6:21 am, kcrisman <kcris...@gmail.com> wrote:
> On Dec 9, 5:07 pm, Harald Schilly <harald.schi...@gmail.com> wrote:
>
>
>
> > Hi, i got a "report a problem" comment about how
> > simplify/full_simplify works. I think this could be sent to maxima
> > upstream?
>
> > Well, here is the (rather educational) example:
>
> > sage: a=(sqrt(6)-sqrt(5))^-1
>
> > sage: a
> > -1/(sqrt(5) - sqrt(6))
>
> > sage: a.full_simplify()
> > 1/(sqrt(2)*sqrt(3) - sqrt(5))
>
> > sage: a.simplify()
> > -1/(sqrt(5) - sqrt(6))
>
> Before doing that, note that the Sage rep probably treats the
> denominator separately somehow.  Also, since full_simplify() calls a
> whole heck of a lot of things, they may cancel each other out in this
> case - it would be worth trying a few of the simplify_blah separately;
> unfortunately, I can't do that right now.  Anyway, let's not assume
> it's Maxima until we're sure :)

Maxima will remove roots from the denominator by default. You need to
set the option variable algebraic:

(%i1) a: (sqrt(6)-sqrt(5))^-1$
(%i2) ratsimp(a);
(%o2) 1/(sqrt(6)-sqrt(5))
(%i3) ratsimp(a), algebraic=true;
(%o3) sqrt(6)+sqrt(5)

Andrej

-- 
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

Reply via email to