On Tue, 16 Oct 2012 at 11:00AM -0700, kcrisman wrote:
> This will call self.exp(), and apparently mpf numbers don't exponentiate 
> with that function, but instead:
>  
>     def exp(self):
>         """
>         Returns the binary exponent of self ::
> 
>             sage: from mpmath import mpf
>             sage: mpf(1/64.).exp
>             -6
>         """
>         return self._mpf_[2]
> 
> So there is a name conflict that exp(a) calls a.exp() but in mpmath this 
> does something totally different.
> 
> sage: a = mpmath.mpf('-0.0712959029907420240935')
> sage: a.exp
> -56
> sage: type(a.exp)
> <type 'int'>
> 
> Yup, can't call that.

Good find. This is now http://trac.sagemath.org/sage_trac/ticket/13608.

Dan

--
---  Dan Drake
-----  http://math.pugetsound.edu/~ddrake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to