Source File
math.go
Belonging Package
go/printer
// Copyright 2026 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 printerimport// log2ish returns a crude approximation to logâ‚‚(x).// The result is only used for heuristic alignment decisions and should// not be used where precision matters.// The approximation is guaranteed to produce identical results// across all architectures.func ( float64) float64 {, := math.Frexp()return float64() + 2*(-1)}// exp2ish returns a crude approximation to 2**x.// The result is only used for heuristic alignment decisions and should// not be used where precision matters.// The approximation is guaranteed to produce identical results// across all architectures.func ( float64) float64 {:= math.Floor():= -return math.Ldexp(1+, int())}
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64)