Opened 5 years ago

Closed 5 years ago

#22074 closed defect (fixed)

Ensure that NaN != NaN in RealField

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.5
Component: basic arithmetic Keywords:
Cc: rws Merged in:
Authors: Jeroen Demeyer Reviewers: Marc Mezzarobba
Report Upstream: N/A Work issues:
Branch: 7dfec29 (Commits, GitHub, GitLab) Commit: 7dfec293742af78b5d47c9175c2f9fe0592a4631
Dependencies: #22076 Stopgaps:

Status badges

Description

NaN should never compare equal to anything, including itself (following the IEEE-754 standard). But in Sage we have

sage: a = RR('NaN')
sage: a == a
True

Change History (15)

comment:1 Changed 5 years ago by jdemeyer

  • Authors set to Jeroen Demeyer

comment:2 Changed 5 years ago by tmonteil

Note that it is already OK for Python float and complex, RDF, RBF, RIF, CIF, but not for:

  • CC
  • CBF
  • CDF
  • Symbolic Ring (for which i have no opinion).

comment:3 Changed 5 years ago by jdemeyer

  • Summary changed from NaN != NaN to NaN != NaN in RealField

I'm only dealing with RealField in this ticket.

comment:4 Changed 5 years ago by jdemeyer

  • Dependencies set to #22076

comment:5 Changed 5 years ago by jdemeyer

  • Cc rws added

comment:6 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/nan____nan

comment:7 Changed 5 years ago by jdemeyer

  • Commit set to be9e5b0a2569e49f819500be9b73f4042da769a1
  • Status changed from new to needs_review

New commits:

65b1205Use richcmp to compare polynomials
be9e5b0Ensure that NaN != NaN in RealField

comment:8 Changed 5 years ago by jdemeyer

  • Summary changed from NaN != NaN in RealField to Ensure that NaN != NaN in RealField

comment:9 follow-up: Changed 5 years ago by mmezzarobba

  • Status changed from needs_review to positive_review

Lgtm, except for a typo in a comment.

Last edited 5 years ago by mmezzarobba (previous) (diff)

comment:10 Changed 5 years ago by mmezzarobba

  • Reviewers set to Marc Mezzarobba

comment:11 in reply to: ↑ 9 ; follow-up: Changed 5 years ago by jdemeyer

Replying to mmezzarobba:

Lgtm, except for a typo in a comment.

What's the typo?

comment:12 in reply to: ↑ 11 Changed 5 years ago by mmezzarobba

Replying to jdemeyer:

Replying to mmezzarobba:

Lgtm, except for a typo in a comment.

What's the typo?

"AsserionError?"

comment:13 Changed 5 years ago by git

  • Commit changed from be9e5b0a2569e49f819500be9b73f4042da769a1 to 7dfec293742af78b5d47c9175c2f9fe0592a4631
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

7dfec29Typo

comment:14 Changed 5 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:15 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/nan____nan to 7dfec293742af78b5d47c9175c2f9fe0592a4631
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.