Opened 9 years ago

Closed 9 years ago

#14045 closed defect (fixed)

Comparison of float('inf') and infinity

Reported by: tscrim Owned by: tscrim
Priority: major Milestone: sage-5.7
Component: coercion Keywords: infinity, coercion
Cc: Merged in: sage-5.7.beta3
Authors: Travis Scrimshaw Reviewers: Robert Bradshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by tscrim)

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

Attachments (1)

trac_14045-float_infinity_coercion-ts.patch (2.3 KB) - added by tscrim 9 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by tscrim

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by tscrim

  • Description modified (diff)

comment:3 Changed 9 years ago by robertwb

  • Status changed from needs_review to positive_review

Makes a lot of sense to me, thanks.

comment:4 Changed 9 years ago by jdemeyer

  • Reviewers set to Robert Bradshaw
  • Status changed from positive_review to needs_work

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.

Changed 9 years ago by tscrim

comment:5 Changed 9 years ago by tscrim

  • Status changed from needs_work to positive_review

Forgot to export. Sorry. Fixed.

comment:6 Changed 9 years ago by robertwb

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

comment:7 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.7.beta3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.