Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lcm() symbolic #15497

Open
ppurka opened this issue Dec 9, 2013 · 2 comments
Open

Make lcm() symbolic #15497

ppurka opened this issue Dec 9, 2013 · 2 comments

Comments

@ppurka
Copy link
Member

ppurka commented Dec 9, 2013

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

CC: @kcrisman @sagetrac-kbaut @sagetrac-jakobkroeker

Component: symbolics

Stopgaps: todo

Issue created by migration from https://trac.sagemath.org/ticket/15497

@ppurka ppurka added this to the sage-6.1 milestone Dec 9, 2013
@kcrisman
Copy link
Member

kcrisman commented Dec 9, 2013

comment:2

Here is the problem, presumably (lcm not being symbolic in this way):

sage: lcm(10,x)
10*x

We can all be Gauss with this.

sage: sum(lcm(1,x),x,1,100)
5050

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?

@jdemeyer jdemeyer changed the title sum(lcm(10, i), i, 1, 10) gives incorrect answer Make lcm() symbolic Dec 10, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@kcrisman
Copy link
Member

kcrisman commented Aug 6, 2014

comment:8

See also #16721.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants