projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
.gitignore added
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
honnef.co
/
go
/
tools@v0.1.1
/
staticcheck
/
testdata
/
src
/
CheckNaNComparison
/
CheckNaNComparison.go
1
package pkg
2
3
import "math"
4
5
func fn(f float64) {
6
_ = f == math.NaN() // want `no value is equal to NaN`
7
_ = f > math.NaN() // want `no value is equal to NaN`
8
_ = f != math.NaN() // want `no value is equal to NaN`
9
}
10
11
func fn2(f float64) {
12
x := math.NaN()
13
if true {
14
if f == x { // want `no value is equal to NaN`
15
}
16
}
17
}