#9652: Unnecesary and buggy code in arith.py
------------------------+---------------------------------------------------
Reporter: mderickx | Owner: AlexGhitza
Type: defect | Status: needs_work
Priority: minor | Milestone:
Component: algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Changes (by lftabera):
* status: needs_review => needs_work
Comment:
You have to import "Integer" somewhere in the code:
{{{
sage: a=int(3)
sage: valuation(a,2)
...
--> 695 m=Integer(m)
...
NameError: global name 'Integer' is not defined
}}}
Add a doctest that uses an 'int' as argument to check that the previous
code will work.
In the documentation, it says that valuation os zero is +Infinity but
valuation with respect to zero is an error. However:
{{{
sage: valuation(0,0)
+Infinity
sage: K=QQ['x']
sage: x=K.gen()
sage: valuation(x,K(0))
...
PariError
sage: valuation(K(0),K(0))
+Infinity
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9652#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 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.