-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version
)?
$ go version
gollvm
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env
Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz (Cascade Lake)
What did you do?
error case:
package main
import (
"fmt"
"math"
)
var (
nan = math.NaN()
inf = math.Inf(1)
zero = 0.0
)
func main() {
var val complex128 = complex(zero, zero)
var val1 complex128 = complex(nan, inf)
res1 := val / val1
fmt.Println(res1)
}
What did you expect to see?
(0+0i)
According to ISO/IEC 9899:1999 (E), (0+0i) / (NaN+Infi) = (0+0i)
What did you see instead?
(NaN+NaNi)
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.