Skip to content

internal/strconv: TestPow10 fails on s390x #76247

@srinivas-pokala

Description

@srinivas-pokala

Go version

go version go1.26-devel_5241d114f5 Mon Nov 10 12:48:05 2025 -0800 linux/s390x

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='s390x'
GOAUTH='netrc'
GOBIN='/root/go/bin'
GOCACHE='/root/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -march=z13 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3991484166=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='s390x'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/root/go_compiler/dev/go_new/src/go.mod'
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/root/go_compiler/dev/go_new'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/go_compiler/dev/go_new/pkg/tool/linux_s390x'
GOVCS=''
GOVERSION='go1.26-devel_5241d114f5 Mon Nov 10 12:48:05 2025 -0800'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

TestPow10 testcase is failing on linux/s390x, this is happening with recent changes: internal/strconv: fix pow10 off-by-one in exponent result.
When I ran ./all.bash on upstream master branch , TestPow10 is failing

What did you see happen?

--- FAIL: TestPow10 (0.00s) math_test.go:46: pow10(-323) = 0x818995ce7aa0e1b27343efebd1940993/2^128 * 2^-1072 = 1e-323 want ~0 math_test.go:46: pow10(-322) = 0xa1ebfb4219491a1f1014ebe6c5f90bf8/2^128 * 2^-1069 = 1e-322 want ~0 math_test.go:46: pow10(-321) = 0xca66fa129f9b60a6d41a26e077774ef6/2^128 * 2^-1066 = 1e-321 want ~0 math_test.go:46: pow10(-320) = 0xfd00b897478238d08920b098955522b4/2^128 * 2^-1063 = 1e-320 want ~0 math_test.go:46: pow10(-319) = 0x9e20735e8cb1638255b46e5f5d5535b0/2^128 * 2^-1059 = 1e-319 want ~0 math_test.go:46: pow10(-318) = 0xc5a890362fddbc62eb2189f734aa831d/2^128 * 2^-1056 = 1e-318 want ~0 math_test.go:46: pow10(-317) = 0xf712b443bbd52b7ba5e9ec7501d523e4/2^128 * 2^-1053 = 1e-317 want ~0 math_test.go:46: pow10(-316) = 0x9a6bb0aa55653b2d47b233c92125366e/2^128 * 2^-1049 = 1e-316 want ~0 math_test.go:46: pow10(-315) = 0xc1069cd4eabe89f8999ec0bb696e840a/2^128 * 2^-1046 = 1e-315 want ~0 math_test.go:46: pow10(-314) = 0xf148440a256e2c76c00670ea43ca250d/2^128 * 2^-1043 = 1e-314 want ~0 math_test.go:46: pow10(-313) = 0x96cd2a865764dbca380406926a5e5728/2^128 * 2^-1039 = 1e-313 want ~0 math_test.go:46: pow10(-312) = 0xbc807527ed3e12bcc605083704f5ecf2/2^128 * 2^-1036 = 1e-312 want ~0 math_test.go:46: pow10(-311) = 0xeba09271e88d976bf7864a44c633682e/2^128 * 2^-1033 = 1e-311 want ~0 math_test.go:46: pow10(-310) = 0x93445b8731587ea37ab3ee6afbe0211d/2^128 * 2^-1029 = 1e-310 want ~0 math_test.go:46: pow10(-309) = 0xb8157268fdae9e4c5960ea05bad82964/2^128 * 2^-1026 = 1e-309 want ~0 math_test.go:46: pow10(-308) = 0xe61acf033d1a45df6fb92487298e33bd/2^128 * 2^-1023 = 1e-308 want ~0 math_test.go:46: pow10(-307) = 0x8fd0c16206306baba5d3b6d479f8e056/2^128 * 2^-1019 = 1e-307 want ~0 math_test.go:46: pow10(-306) = 0xb3c4f1ba87bc86968f48a4899877186c/2^128 * 2^-1016 = 1e-306 want ~0 math_test.go:46: pow10(-305) = 0xe0b62e2929aba83c331acdabfe94de87/2^128 * 2^-1013 = 1e-305 want ~0 math_test.go:46: pow10(-304) = 0x8c71dcd9ba0b49259ff0c08b7f1d0b14/2^128 * 2^-1009 = 1e-304 want ~0 math_test.go:46: pow10(-303) = 0xaf8e5410288e1b6f07ecf0ae5ee44dd9/2^128 * 2^-1006 = 1e-303 want ~0 math_test.go:46: pow10(-302) = 0xdb71e91432b1a24ac9e82cd9f69d6150/2^128 * 2^-1003 = 1e-302 want ~0 math_test.go:46: pow10(-301) = 0x892731ac9faf056ebe311c083a225cd2/2^128 * 2^-999 = 1e-301 want ~0 math_test.go:46: pow10(-300) = 0xab70fe17c79ac6ca6dbd630a48aaf406/2^128 * 2^-996 = 1e-300 want ~0 math_test.go:46: pow10(-299) = 0xd64d3d9db981787d092cbbccdad5b108/2^128 * 2^-993 = 1e-299 want ~0 FAIL

What did you expect to see?

Test should pass

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.arch-s390xIssues solely affecting the s390x architecture.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions