gitee.com/quant1x/num@v0.3.2/math32/copysign.go (about) 1 package math32 2 3 import "math" 4 5 func Copysign(x, y float32) float32 { 6 const sign = 1 << 31 7 return math.Float32frombits(math.Float32bits(x)&^sign | math.Float32bits(y)&sign) 8 }