-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Go version
go version go1.21.5 darwin/arm64 and linux/amd64
Output of go env in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/jasonmo/Library/Caches/go-build'
GOENV='/Users/jasonmo/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/jasonmo/go/pkg/mod'
GONOPROXY='github.com/pingcap/*'
GONOSUMDB='github.com/pingcap/*'
GOOS='darwin'
GOPATH='/Users/jasonmo/go'
GOPRIVATE='github.com/pingcap/*'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/jasonmo/github/tidb-x/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'What did you do?
// You can edit this code!
// Click here and start typing.
package main
import (
"fmt"
"math"
)
func main() {
b := math.Tan(math.Pi / 4)
fmt.Println(b)
}
What did you see happen?
On Arm64 env:
0.9999999999999998
On Amd64 env:
1
What did you expect to see?
Results should be same and equal to 1.