On 9/13/11 4:24 PM, Rolandb wrote:


On 13 sep, 22:53, Maarten Derickx<[email protected]>  wrote:
I think it is consequent. list(factor(n)) just gives a list of tuples (p,e)
where p is a prime dividing n and e is it's exponent. Since there are no
primes dividing 1 the list is empty.

Thanks for the swift reply!

However, not always one knows that the element equals 1 as it could be
the outcome of a formulea. Is it an idea to introduce a boolean in
order to yield [1,1] when wanted?
Thus factor(element,passone=True).

Do you have an example of when you would want list(factor(1)) to return [(1,1)]? It's inconsistent with the documentation and the idea of the factor function, so I'm wondering if there may be a better way to deal with whatever situation you are thinking of.

Thanks,

Jason

--
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-support
URL: http://www.sagemath.org

Reply via email to