# Radical in the denominator?

Is there any way I can get a general complex number to display with the radical in the denominator, rather than having it rationalized? For example (1+i)/sqrt(2).

edit retag close merge delete

Sort by ยป oldest newest most voted

With the patches recently merged to Sage 4.6.alpha3, you can do this:

sage: sqrt(2).power(-1, hold=True)*(1+i)
(I + 1)/sqrt(2)


If you want to try it out before the release, you can find the new alpha here:

http://sage.math.washington.edu/home/release/sage-4.6.alpha3/sage-4.6.alpha3.tar

or you can upgrade with

./sage -upgrade http://sage.math.washington.edu/home/release/sage-4.6.alpha3/

more

If I understand correctly what you're saying, that would allow me to specifically enter a number in that form, and keep that specific number from being changed before being displayed, right? But what I'm looking for is a more general "form" ... simplify_??? ... Does that make any sense?

( 2010-10-10 07:20:03 -0600 )edit

One of the automatic evaluations pynac performs is to clear radicals from the denominator, as in 1/sqrt(2) -> 1/2*sqrt(2). I'm afraid it's not possible to disable this in general.

( 2010-10-10 08:16:56 -0600 )edit

OK, I understand. The technique above may still have some value for me. I didn't have any success getting the alpha version to build, but I'll check it out when 4.6 gets released.

( 2010-10-10 08:28:46 -0600 )edit

Mike, if you have the time, could you give us information about your build problem with 4.6.alpha3 on the sage-release mailing list ( http://groups.google.com/group/sage-release )?

( 2010-10-10 11:29:56 -0600 )edit