Hi Jason,

On Sat, 02 Jan 2010 15:14:15 -0700
Jason Grout <jason-s...@creativetrax.com> wrote:

> Here is the problem, narrowed down a bit:
> 
> 
> sage: log(SR(float(-7.0)))
> Traceback (most recent call last):
> ...
> ValueError: math domain error
> sage: log(float(-7.0))
> 1.94591014906 + 3.14159265359*I
> sage: log(RR(-7.0))
> 1.94591014905531 + 3.14159265358979*I
> sage: log(SR(-7))
> I*pi + log(7)
> sage: log(SR(-7.0))
> 1.94591014905531 + 3.14159265358979*I
> 
> 
> Note the first answer, a symbolic-wrapped float, gave a domain error. 
> Is that version calling some C library that doesn't deal with complex 
> numbers?  The floating point numbers in this problem appear because
> we use hardware floats in plotting for speed.

Many thanks for these examples. They were really helpful.
 
> Burcin, do you see what is going on?  Do you know how to fix it?

With the patch at #7490, I changed pynac to call math.log() to evaluate
logarithms when the argument is a float. This function raises the
domain error we see on input <= 0, but I missed that. 

I attached a fix to #7822:

http://trac.sagemath.org/sage_trac/ticket/7822


Cheers,
Burcin

-- 
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
URL: http://www.sagemath.org

Reply via email to