#13692: factor_trial_division returns Python longs as exponents
---------------------------------+------------------------------------------
       Reporter:  dimpase        |         Owner:  was     
           Type:  defect         |        Status:  new     
       Priority:  major          |     Milestone:  sage-5.5
      Component:  number theory  |    Resolution:          
       Keywords:                 |   Work issues:          
Report Upstream:  N/A            |     Reviewers:          
        Authors:                 |     Merged in:          
   Dependencies:                 |      Stopgaps:          
---------------------------------+------------------------------------------
Description changed by dimpase:

Old description:

> unlike the rest (?) of Sage, factor_trial_division returns wants
> exponents of powers to be Python longs:
> {{{
> sage: from sage.rings.factorint import factor_trial_division
> sage: [t for t in factor_trial_division(8)]
> [(2, 3L)]
> }}}
> It is a bug or a feature? It leads to this kind of data also being
> returned by factor():
> {{{
> sage: [t for t in Integer(8).factor(limit=1000)]
> [(2, 3L)]
> }}}
> as opposed to
> {{{
> sage: [t for t in Integer(8).factor()]
> [(2, 3)]
> }}}
> See this [https://groups.google.com/d/topic/sage-
> support/whnvwlDrAEo/discussion sage-support thread].
> Something should be fixed - either factor(), or factor_trial_division()

New description:

 unlike the rest (?) of Sage, factor_trial_division returns  exponents of
 primes as Python longs:
 {{{
 sage: from sage.rings.factorint import factor_trial_division
 sage: [t for t in factor_trial_division(8)]
 [(2, 3L)]
 }}}
 It is a bug or a feature? It leads to this kind of data also being
 returned by factor():
 {{{
 sage: [t for t in Integer(8).factor(limit=1000)]
 [(2, 3L)]
 }}}
 as opposed to
 {{{
 sage: [t for t in Integer(8).factor()]
 [(2, 3)]
 }}}
 See this [https://groups.google.com/d/topic/sage-
 support/whnvwlDrAEo/discussion sage-support thread].
 Something should be fixed - either factor(), or factor_trial_division()

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13692#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to