Sorry I never attached the graphic - it's on my desktop, but the
Google Groups help leads me to believe someone has turned off file
posting on this group (on sage-support it seems to still be available,
though, given recent posts).

>
> OK, now I'm curious.  I still get errors (with 2.10.1 and with
> 2.10.2.alpha0), as do a couple of people I asked to test this on IRC.
>
> What OS/architecture are you using?
>

Mac OSX.4, PowerPC G4

> Do you get different results than this:
> sage: import math
> sage: math.sqrt(float(-1))
> ---------------------------------------------------------------------------
> <type 'exceptions.ValueError'>            Traceback (most recent call
> last)
>
> /home/cwitty/sage/<ipython console> in <module>()
>
> <type 'exceptions.ValueError'>: math domain error

Yes, I do!

sage: import math
sage: math.sqrt(float(-1))
nan

My computer's native Python installation also provides:

Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.sqrt(float(-1))
nan

So presumably plot is somehow using this.  Personally, I think this is
a feature, not a bug - if one specifies an implied real range for a
function, non-real outputs should just be ignored, which should avoid
the messing up of internal calculations that having a "real" method or
something would imply.  For instance, on the same computer, the
following plots something nice and without complex branches or
something weird like that:

sage: show(plot(log(x),-5,5))

While looking into this I discovered:

sage: log(0)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>
[lots of stuff]
<type 'exceptions.TypeError'>: error evaluating "log(0)":
Error executing code in Maxima
CODE:
        log(0);
Maxima ERROR:
log(0) has been generated.

Presumably log(0) should provide a more helpful (and much shorter)
error message.  And what does this phrase, "log(0) has been
generated," mean?

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to