#6842: [with patch, needs review] ordinal_str giving wrong answers for 111, 112,
113
------------------------------+---------------------------------------------
Reporter: SimonKing | Owner: somebody
Type: defect | Status: new
Priority: minor | Milestone: sage-4.1.2
Component: basic arithmetic | Keywords: ordinals
Reviewer: | Author: Simon King
Merged: |
------------------------------+---------------------------------------------
The following is incorrect, if I am not mistaken (but I am not a native
speaker):
{{{
sage: n = 113
sage: n.ordinal_str()
'113rd'
sage: n = 112
sage: n.ordinal_str()
'112nd'
sage: n = 111
sage: n.ordinal_str()
'111st'
}}}
With my patch, one gets
{{{
sage: n = 111
sage: n.ordinal_str()
'111th'
sage: n = 112
sage: n.ordinal_str()
'112th'
sage: n = 113
sage: n.ordinal_str()
'113th'
}}}
while one still has
{{{
sage: n = 121
sage: n.ordinal_str()
'121st'
sage: n = 122
sage: n.ordinal_str()
'122nd'
sage: n = 123
sage: n.ordinal_str()
'123rd'
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6842>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---