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

Using elements of universal cyclotomic field and symbolic ring silently produces garbage #19567

Closed
sagetrac-switzel mannequin opened this issue Nov 10, 2015 · 4 comments

Comments

@sagetrac-switzel
Copy link
Mannequin

sagetrac-switzel mannequin commented Nov 10, 2015

sage: UCF = UniversalCyclotomicField()
sage: UCF(1)*SR(1)
0
sage: UCF(1)+SR(1)
1

Clearly the first one should be 1 in some ring or raise an exception. Similarly the second should be 2 in some ring or raise an exception.

This seems to have been fixed by #19912.

CC: @fchapoton @slel @stumpc5 @videlec

Component: number fields

Keywords: cyclotomic field, symbolic ring

Reviewer: Travis Scrimshaw

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

@sagetrac-switzel sagetrac-switzel mannequin added this to the sage-6.10 milestone Nov 10, 2015
@nbruin
Copy link
Contributor

nbruin commented Nov 10, 2015

comment:1

It's an off-by-one error in loop bounds:

sage: 1+UCF.4
1 + E(4)
sage: (1+UCF.4)._symbolic_(SR)
I

The routine lives in sage/rings/universal_cyclotomic_field.py and the range should be range(k) rather than range(1,k) there.

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented May 19, 2016

comment:2

Apparently fixed at #19912 by exactly the fix suggested in comment 1 above.

@slel slel removed this from the sage-6.10 milestone May 19, 2016
@tscrim
Copy link
Collaborator

tscrim commented May 19, 2016

Reviewer: Travis Scrimshaw

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