On Nov 28, 1:28 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On Nov 28, 9:14 am, Robert Bradshaw <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Nov 27, 2008, at 6:58 AM, [EMAIL PROTECTED] wrote:
>
> > > Hello,
>
> > > the example below shows that a complex number ( i think the "I" stands
> > > for it ? ) appears by doing a simplify_full. Is there a way to prevent
> > > this and to get output in real number format?
>
> > > sage: var('omgo zr ys cz')
> > > sage: eqomgo = omgo == (sqrt(2*ys - 2*cz)*sqrt(2*zr - 2*cz))/(2*zr -
> > > 2*cz)
> > > sage: eqomgo.rhs().simplify_full()
> > > I*sqrt(cz - ys)/sqrt(zr - cz)
>
> > Is ys assumed to be larger than cz? What about zr and cz? You can use
> > the assume command
>
> > sage: assume(ys > cz)
> > sage: assume(zr > cz)
>
> > Then do
>
> > sage: sage: eqomgo.rhs().simplify_full().real()
> > -sqrt(ys - cz)/sqrt(zr - cz)
>
> Thanks for your answer!
> Sorry, i didn't wrote that we tried the assume command. We just forgot
> to use the real() function...

Hello again,

my problem was / is the prevention of falling into complex numbers. Is
there also a way to define variables to be and stay in a real format
for a whole worksheet? So i could avoid the use of the real() function
after each equation.

Thanks,
Andreas

Is there also a way to define the variables at the start of a
worksheet to
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to