I like Jason's idea (specifically real_nth_root) as a method.

However, to me the real issue is plotting.  If someone tries to get a
cube root of -1 and gets a complex number, at least they see there is
an output!  And then someone can help them understand why they get
that answer.

But there is a well-defined real plot for the cube root of x, with
domain the whole real line, and Sage should somehow be able to better
than what is in the plot documentation (from all our previous
discussions):

sage: plot(lambda x : RR(x).nth_root(3), (x,-1, 1))

I hesitate to say we should be able to globally import and have
something like

sage: plot(real_nth_root(x,3), (x,-1,1))

and afaict having semantics to check for every case out there like
when plotting x^(2/3)+x^(1/3) would be ridiculous.  Plus I'm not even
sure Python/Sage allow us to "call" functions partly and then plot
them, based on previous discussions here.  But any idea for how to
make this class of plots a little more straightforward (i.e. doable in
one command without lambdas or semicolons) would be very helpful.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to