The current implementation using InfinityRing and SignedInfinityRing is very close to having a value saying "not defined" (i.e. NaN), and viewed in that light the way things currently work makes sense. It works for the purpose of not raising an exception on division by zero. I am not at all sure I always want that to not throw an exception, however.
There are also more sophisticated ways of dealing with infinity. E.g. one can do interval arithmetic over the reals and make positive infinity the subset of positive reals, unsigned infinity the subset of all reals and so on. I think the algebraic structure within which I choose to carry out my computations should dictate how infinity behaves. So I am in favor of getting rid of the InfinityRing and replacing it with extended versions of each algebraic structure that needs an infinity. To avoid duplicating code, one Python class can define many extended structures in the same way polynomial rings are defined using the same Python code regardless of the base structure. E.g. there could be one ring defining extensions for all substructures of the reals. --~--~---------~--~----~------------~-------~--~----~ 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-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
