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:  sage7.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: 
Description
NaN
should never compare equal to anything, including itself (following the IEEE754 standard). But in Sage we have
sage: a = RR('NaN') sage: a == a True
Change History (15)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
comment:3 Changed 5 years ago by
 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
 Dependencies set to #22076
comment:5 Changed 5 years ago by
 Cc rws added
comment:6 Changed 5 years ago by
 Branch set to u/jdemeyer/nan____nan
comment:7 Changed 5 years ago by
 Commit set to be9e5b0a2569e49f819500be9b73f4042da769a1
 Status changed from new to needs_review
comment:8 Changed 5 years ago by
 Summary changed from NaN != NaN in RealField to Ensure that NaN != NaN in RealField
comment:9 followup: ↓ 11 Changed 5 years ago by
 Status changed from needs_review to positive_review
Lgtm, except for a typo in a comment.
comment:10 Changed 5 years ago by
 Reviewers set to Marc Mezzarobba
comment:11 in reply to: ↑ 9 ; followup: ↓ 12 Changed 5 years ago by
comment:12 in reply to: ↑ 11 Changed 5 years ago by
Replying to jdemeyer:
Replying to mmezzarobba:
Lgtm, except for a typo in a comment.
What's the typo?
comment:13 Changed 5 years ago by
 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:
7dfec29  Typo

comment:14 Changed 5 years ago by
 Status changed from needs_review to positive_review
comment:15 Changed 5 years ago by
 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.
Note that it is already OK for Python
float
andcomplex
,RDF
,RBF
,RIF
,CIF
, but not for:CC
CBF
CDF
Symbolic Ring
(for which i have no opinion).