]> Cypherpunks repositories - gostls13.git/commit
math: use shared signMask constant
authormohanson <mohanson@outlook.com>
Tue, 23 Dec 2025 02:44:51 +0000 (10:44 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 23 Jan 2026 16:23:44 +0000 (08:23 -0800)
commit23f7ba554d0e3ffbe18d04e79c34984e050869e1
treec13bae91ee0d2af9a46adcbd53fd0f1e2fb25e70
parent84c8483e02280a87d71eac6b231a514200dfab2b
math: use shared signMask constant

In abs.go and copysign.go, magic numbers and local constants are
used for the sign bit mask (1 << 63), even though a shared constant
signMask already exists in bits.go.

Change-Id: Ic3aeb9b52674538443cbe074acfeb373a3c74a8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/732060
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/math/abs.go
src/math/copysign.go