Opened 4 years ago
Closed 4 years ago
#21518 closed defect (fixed)
Integer log is puzzled by Python int argument
Reported by: | rws | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.4 |
Component: | numerical | Keywords: | |
Cc: | Merged in: | ||
Authors: | Ralf Stephan | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | ab830ba (Commits) | Commit: | ab830ba125650250d003cc52e540993f244d1be2 |
Dependencies: | #21517 | Stopgaps: |
Description
sage: ZZ(8).log(int(2)) log(8)/log(2)
Change History (12)
comment:1 Changed 4 years ago by
- Branch set to u/rws/integer_log_is_puzzled_by_python_int_argument
comment:2 Changed 4 years ago by
- Commit set to 3ce2cd2f4569ab9f19cb26fe1d1b1304044ae3f0
- Dependencies set to #21517
- Status changed from new to needs_review
comment:3 Changed 4 years ago by
Why not if type(m) == int:
? Or perhaps, a more robust if m in ZZ:
(or try: m = Integer(m)
)?
comment:4 Changed 4 years ago by
- Reviewers set to Travis Scrimshaw
comment:5 Changed 4 years ago by
- Commit changed from 3ce2cd2f4569ab9f19cb26fe1d1b1304044ae3f0 to 79a5a4a3a653880fac7a437c6cbd9e11c8930bb0
Branch pushed to git repo; I updated commit sha1. New commits:
79a5a4a | 21518: improve code
|
comment:6 Changed 4 years ago by
- Commit changed from 79a5a4a3a653880fac7a437c6cbd9e11c8930bb0 to 33a0de346639a01269259433e34033950122bb47
comment:7 Changed 4 years ago by
Why is the if m is None:
case in the try block? Could we just test that first?
comment:8 Changed 4 years ago by
- Commit changed from 33a0de346639a01269259433e34033950122bb47 to 6e250f0c48f717763c358708c8154eb2770176a9
Branch pushed to git repo; I updated commit sha1. New commits:
6e250f0 | 21518: reorder some lines
|
comment:9 Changed 4 years ago by
One last thing, the if m in None:
block is 1 over indented. Once you make this change, you can set a positive review on my behalf.
comment:10 Changed 4 years ago by
- Commit changed from 6e250f0c48f717763c358708c8154eb2770176a9 to ab830ba125650250d003cc52e540993f244d1be2
Branch pushed to git repo; I updated commit sha1. New commits:
ab830ba | 21518: cosmetics
|
comment:11 Changed 4 years ago by
- Status changed from needs_review to positive_review
Thanks for the review.
comment:12 Changed 4 years ago by
- Branch changed from u/rws/integer_log_is_puzzled_by_python_int_argument to ab830ba125650250d003cc52e540993f244d1be2
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
21517: handle ZZ.log(1/n)
21518: accept Python ints as log base to ZZ.log