-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
What version of Go are you using (go version
)?
$ go version go1.19
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
What did you do?
package main
import (
"fmt"
)
func main() {
v := int64((float64(0.03) - float64(0.02)) * 1_000_000)
fmt.Println(v)
}
https://go.dev/play/p/V0KH5qKf6u4
What did you expect to see?
10000
What did you see instead?
cannot convert (float64(0.03) - float64(0.02)) * 1_000_000 (constant 10000 of type float64) to type int64
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.