#8857: lcm of constant polynomials
-------------------------------------+-------------------------------------
Reporter: burcin | Owner: AlexGhitza
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.1
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/mmezzarobba/ticket/8857 | fdfe08a9265043fb6d5a357f2599ce5db23cd8c3
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Old description:
> Reported by Manuel Kauers:
>
> {{{
> sage: R.<x> = QQ[x]
> sage: R(1/2).lcm(R(1))
> <boom>
> sage: R(2^31).lcm(R(1))
> <boom>
> }}}
>
> The backtrace indicates that we call Singular for this, which is
> completely unnecessary.
>
> We should check if this persists with #4000 as well.
New description:
* `a.lcm(b)` where `a` and `b` are constant polynomials is broken over a
variety of rings:
{{{
sage: R.<x,y> = RR[]
sage: R(2^31).lcm(R(2*x+1)) # Boom
}}}
{{{
sage: R.<x,y> = FractionField(QQ['t'])[]
sage: R(2^31).lcm(R(2*x+1)) # Boom
}}}
* In other cases (including the original example of the above problem,
reported by Manuel Kauers and now fixed, presumably by #4000), the output
is inconsistent with the gcd over the base ring:
{{{
sage: R.<x> = QQ[x]
sage: R(1/2).lcm(R(1))
1
sage: (1/2).lcm(QQ(1))
1
}}}
--
Comment (by mmezzarobba):
Replying to [comment:12 tscrim]:
> However you do agree that this behavior is inconsistent?
From a user interface point of view, yes, I do. From a mathematical (or
programming) point of view I am not sure.
> Also, a similar problem with using `RR` (and other like fields) as in
the this ticket:
> {{{
> sage: R.<x,y> = RR[]
> sage: R(2^31).lcm(R(2*x+1)) # Boom
> }}}
> and `R.<x,y> = FractionField(QQ['t'])[]`. So should we use this ticket
as one to fix this as well since it essentially is the same bug?
Yes, why not.
--
Ticket URL: <http://trac.sagemath.org/ticket/8857#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.