Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison of float('inf') and infinity #14045

Closed
tscrim opened this issue Jan 31, 2013 · 7 comments
Closed

Comparison of float('inf') and infinity #14045

tscrim opened this issue Jan 31, 2013 · 7 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Jan 31, 2013

Currently infinity and float do not compare properly:

sage: oo > float('inf')
True
sage: oo == float('+inf')
False

because of

sage: InfinityRing(float('inf'))
A positive finite number

Sage-devel topic: http://groups.google.com/forum/?fromgroups=#!topic/sage-devel/GMv525C0YcY

Component: coercion

Keywords: infinity

Author: Travis Scrimshaw

Reviewer: Robert Bradshaw

Merged: sage-5.7.beta3

Issue created by migration from https://trac.sagemath.org/ticket/14045

@tscrim tscrim added this to the sage-5.7 milestone Jan 31, 2013
@tscrim tscrim self-assigned this Jan 31, 2013
@tscrim

This comment has been minimized.

@robertwb
Copy link
Contributor

robertwb commented Feb 2, 2013

comment:3

Makes a lot of sense to me, thanks.

@jdemeyer
Copy link
Contributor

jdemeyer commented Feb 4, 2013

Reviewer: Robert Bradshaw

@jdemeyer
Copy link
Contributor

jdemeyer commented Feb 4, 2013

comment:4

How was this patch file created? It is missing a "User" field, you should create a $HOME/.hgrc file as explained in http://sagemath.org/doc/developer/producing_patches.html and export the patch using hg export tip.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 4, 2013

comment:5

Attachment: trac_14045-float_infinity_coercion-ts.patch.gz

Forgot to export. Sorry. Fixed.

@robertwb
Copy link
Contributor

robertwb commented Feb 4, 2013

comment:6

Sorry I missed that, I was too busy looking at the patch's content :-P.

@jdemeyer
Copy link
Contributor

jdemeyer commented Feb 5, 2013

Merged: sage-5.7.beta3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants