#19444: sage.misc.functional.log(float(3)) raises an AttributeError
--------------------------------+-----------------------------
Reporter: slabbe | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: basic arithmetic | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------------+-----------------------------
`import_statements` suggest to import `log` this way:
{{{
sage: import_statements('log')
# **Warning**: distinct objects with name 'log' in:
# - sage.functions.log
# - math
# - sage.functions
# - sage.misc.functional
from sage.misc.functional import log
}}}
While those works:
{{{
sage: math.log(float(3))
1.0986122886681098
sage: sage.functions.log.log(float(3))
1.0986122886681098
}}}
This one raises an `AttributeError`:
{{{
sage: sage.misc.functional.log(float(3))
Traceback (most recent call last):
...
AttributeError: 'sage.rings.real_double.RealDoubleElement' object has no
attribute '_log_base'
}}}
A subquestion is why do we have two implementations of `log`?
--
Ticket URL: <http://trac.sagemath.org/ticket/19444>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.