3 // Copyright 2018 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
18 func F1(f float64) *S {
20 pf := math.Copysign(f, 1)
23 u: int64(math.Copysign(u, s)),
24 n: int32(math.Copysign((pf-u)*1e9, s)),
28 func F2(f float64) *S {
30 f = math.Copysign(f, 1)
33 u: int64(math.Copysign(u, s)),
34 n: int32(math.Copysign((f-u)*1e9, s)),
42 println("F1:", s1.u, s1.n)
43 println("F2:", s2.u, s2.n)