So perhaps the solution to your problem is the extended integers (or
extended rationals).  This needs some work (both in terms of speed and with
having multiple types for elements of the same parent), but it does have the
benefit of returning 1 as the answer to 1 + 0/infinity.  Perhaps the default
sage infinity should be the infinity of the extended integers, and there's a
coercion map from the extended integers to the extended rationals to the
signed infinity ring to the unsigned infinity ring, as well as coercions
from the integers to the extended integers and the rationals to the extended
rationals.
David

On Jan 24, 2008 12:48 PM, Burcin Erocal <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> Today I witnessed a mathematica user struggling with Sage because of
> the way Sage handles infinity. On trac #1915 you can see an example.
>
> On Thu, 17 Jan 2008 09:52:32 -0500
> David Harvey <[EMAIL PROTECTED]> wrote:
>
> > Question: why does the "unsigned infinity ring" not have a zero
> > element, whereas the "(signed) infinity ring" has a zero?
> >
> > This is okay:
> >
> > sage: 0 / Infinity
> > Zero
>
> I don't think this is okay. In this case we get
>
> sage: 1 + 0/Infinity
> A positive finite number
>
> If 0/Infinity is 0, the result of this should be 1.
>
> > But this is way confusing:
> >
> > sage: oo = UnsignedInfinityRing(Infinity)
> > sage: 0 / oo
> > A number less than infinity
> >
> > I totally expected the last output to be Zero. But it can't be,
> > because the UnsignedInfinityRing doesn't have a zero element.
>
> I would also expect the output to be zero. Moreover, there should be a
> way of returning a numeric zero from these operations. Otherwise the
> coercion model gets confused, and everything ends up being coerced into
> "The Infinity Ring".
>
> sage: Infinity.parent()
> The Infinity Ring
>
>
> Thoughts?
>
> Burcin
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to