Opened 7 years ago
Last modified 4 years ago
#15497 new defect
Make lcm() symbolic
Reported by: | ppurka | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | symbolics | Keywords: | |
Cc: | kcrisman, kbaut, jakobkroeker | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: | todo |
Description
From google spreadsheet which no one reads X-(
sage: sum(lcm(10,x), x, 1, 10) # Incorrect 550 sage: sum([lcm(10,i) for i in xrange(1,11)]) # Correct 320
Change History (10)
comment:1 Changed 7 years ago by
- Cc kcrisman added
comment:2 Changed 7 years ago by
comment:3 Changed 7 years ago by
- Summary changed from sum(lcm(10, i), i, 1, 10) gives incorrect answer to Make lcm() symbolic
comment:4 Changed 7 years ago by
- Component changed from calculus to symbolics
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 6 years ago by
- Cc kbaut added
comment:8 Changed 6 years ago by
See also #16721.
comment:9 Changed 6 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:10 Changed 4 years ago by
- Cc jakobkroeker added
Note: See
TracTickets for help on using
tickets.
Here is the problem, presumably (
lcm
not being symbolic in this way):We can all be Gauss with this.
The solution is to make sure that
lcm(a,b)
does something symbolic, or throws an error, when we feed it symbolic entries. Is there already a ticket for this, perhaps?