Ask Your Question
2

Radical in the denominator?

asked 2010-10-10 13:00:07 +0100

Mike Witt gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2010-10-10 13:23:43 +0100

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/
edit flag offensive delete link more

Comments

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?

Mike Witt gravatar imageMike Witt ( 2010-10-10 14:20:03 +0100 )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.

burcin gravatar imageburcin ( 2010-10-10 15:16:56 +0100 )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.

Mike Witt gravatar imageMike Witt ( 2010-10-10 15:28:46 +0100 )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 )?

Mitesh Patel gravatar imageMitesh Patel ( 2010-10-10 18:29:56 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-10-10 13:00:07 +0100

Seen: 758 times

Last updated: Oct 10 '10