#15364: Introduce factor_or_zero into global namespace
---------------------------------+-------------------------
       Reporter:  zabrocki       |        Owner:
           Type:  PLEASE CHANGE  |       Status:  new
       Priority:  major          |    Milestone:  sage-5.13
      Component:  factorization  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:  Mike Zabrocki  |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-------------------------

Comment (by zabrocki):

 I think that is one of many scenarios.  The purpose of this function is
 biased towards number theory.  Most of my colleagues use it in algebra to
 put coefficients in a readable form.  I just want to give people who use
 algebra a less onerous alternative.  I don't want to have to put an if
 statement ''every'' time that I factor an algebraic expression.

 Solution during Sage Days on Monday (which completely stopped everything
 for much longer than was necessary):
 {{{
 sage: map(factor, list_of_coefficients)
 ArithmeticError
 sage: list_coefficients.remove(0)
 sage: map(factor, list_of_coefficients)
 }}}

 A more common scenario is
 {{{
 sage: factor(1/(1-x)-x/(1-x)-1)
 ValueError: factorization of 0 not defined
 }}}
 Or that a similar expression should come up as the coefficient of some
 element in an algebra and one should want to
 `elt.map_coefficients(factor)`.

--
Ticket URL: <http://trac.sagemath.org/ticket/15364#comment:2>
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.

Reply via email to