Opened 11 years ago
Closed 7 years ago
#10136 closed defect (fixed)
`log(x).operator() == log` should return `True`
Reported by:  burcin  Owned by:  burcin 

Priority:  major  Milestone:  sage6.2 
Component:  symbolics  Keywords:  log, ln, function 
Cc:  Merged in:  
Authors:  Burcin Erocal  Reviewers:  Ralf Stephan 
Report Upstream:  N/A  Work issues:  
Branch:  a105f80 (Commits, GitHub, GitLab)  Commit:  a105f80b73a9c76fd1717270f5d029e794353a8b 
Dependencies:  Stopgaps: 
Description (last modified by )
Reported by Francois Maltey on sagedevel:
> log(x).operator() == ln # is True, yes the alias ln is better than > the log name > log(x).operator() == log # is False (this feature looks like the > binomial one) > log(x).operator() == sage.function.log.function_log # is True
We should define a __call__()
method in the Function_log
class from sage/functions/log.py
, to handle the base argument. Then ln()
and log()
can be the same function and log(x).operator() == log
will return True
.
Attachments (1)
Change History (11)
Changed 8 years ago by
comment:1 Changed 8 years ago by
 Description modified (diff)
 Status changed from new to needs_review
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Also, my guess is that log?
will no longer be very helpful. I haven't tried this, though.
comment:4 Changed 8 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:5 Changed 7 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:6 Changed 7 years ago by
 Keywords log ln function added
 Reviewers set to Ralf Stephan
 Status changed from needs_review to positive_review
@ppurka: log
, like exp
, never had an "INPUT" description; the hold
parameter is introduced informally in both cases; please open a separate ticket.
@kcrisman: log?
is fine, and identical to ln?
Reviewer's patch addresses this patchbot failure:
File "src/sage/ext/fast_callable.pyx", line 1524, in sage.ext.fast_callable._expression_binop_helper.get_builtin_functions Failed example: sorted(list(builtins.values())) Expected: ['abs', 'abs', 'acos', 'acosh', 'add', 'asin', 'asinh', 'atan', 'atanh', 'ceil', 'cos', 'cosh', 'cot', 'csc', 'div', 'exp', 'floor', 'floordiv', 'inv', 'log', 'log', 'mul', 'neg', 'pow', 'sec', 'sin', 'sinh', 'sqrt', 'sub', 'tan', 'tanh'] Got: ['abs', 'abs', 'acos', 'acosh', 'add', 'asin', 'asinh', 'atan', 'atanh', 'ceil', 'cos', 'cosh', 'cot', 'csc', 'div', 'exp', 'floor', 'floordiv', 'inv', 'log', 'mul', 'neg', 'pow', 'sec', 'sin', 'sinh', 'sqrt', 'sub', 'tan', 'tanh']
I hazard that this small change won't need another review, so I'll set positive.
comment:7 Changed 7 years ago by
 Branch set to u/rws/ticket/10136
 Modified changed from 02/18/14 08:36:08 to 02/18/14 08:36:08
comment:8 Changed 7 years ago by
 Commit set to a105f80b73a9c76fd1717270f5d029e794353a8b
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
a105f80  Merge branch 'develop' into ticket/10136

comment:9 Changed 7 years ago by
 Status changed from needs_review to positive_review
comment:10 Changed 7 years ago by
 Branch changed from u/rws/ticket/10136 to a105f80b73a9c76fd1717270f5d029e794353a8b
 Resolution set to fixed
 Status changed from positive_review to closed
Just a minor comment: the "INPUT" description for log is now lost. Just by looking at
*args, **kwds
it is not possible to know what should be the order of the argument and the base of the log. Also,**kwds
gives the impression that it can take in a lot of kwd arguments, whereas I think it takes only the keywordhold=True
.