gopherjs
gopherjs copied to clipboard
math.MaxFloat32 converted to int64 incorrectly:
package main
import (
"fmt"
"math"
)
func main() {
var f float32 = math.MaxFloat32
fmt.Printf("Hello, playground: %x\n", int64(float32(f)))
}
Go output: -8000000000000000
GopherJS output: 0
https://gopherjs.github.io/playground/#/2uCovf4ywh https://go.dev/play/p/m7yL_crK_Qb