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)
- Robert
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---