github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckNaNComparison.go (about)

     1  package pkg
     2  
     3  import "math"
     4  
     5  func fn(f float64) {
     6  	_ = f == math.NaN() // MATCH /no value is equal to NaN/
     7  	_ = f > math.NaN()  // MATCH /no value is equal to NaN/
     8  	_ = f != math.NaN() // MATCH /no value is equal to NaN/
     9  }