mirror of
https://github.com/golang/go
synced 2024-10-05 06:11:21 -06:00
a3d1045fb7
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev https://golang.org/cl/180048
22 lines
859 B
Go
22 lines
859 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package math
|
|
|
|
import "unsafe"
|
|
|
|
// Float32bits returns the IEEE 754 binary representation of f.
|
|
func Float32bits(f float32) uint32 { return *(*uint32)(unsafe.Pointer(&f)) }
|
|
|
|
// Float32frombits returns the floating point number corresponding
|
|
// to the IEEE 754 binary representation b.
|
|
func Float32frombits(b uint32) float32 { return *(*float32)(unsafe.Pointer(&b)) }
|
|
|
|
// Float64bits returns the IEEE 754 binary representation of f.
|
|
func Float64bits(f float64) uint64 { return *(*uint64)(unsafe.Pointer(&f)) }
|
|
|
|
// Float64frombits returns the floating point number corresponding
|
|
// the IEEE 754 binary representation b.
|
|
func Float64frombits(b uint64) float64 { return *(*float64)(unsafe.Pointer(&b)) }
|