github.com/golangci/go-tools@v0.0.0-20190318060251-af6baa5dc196/staticcheck/testdata/src/CheckNaNComparison/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  }