Denom returns the denominator of x; x must be Int, Float, or Unknown. If x is Unknown, or if it is too large or small to represent as a fraction, the result is Unknown. Otherwise the result is an Int >= 1.
// Instead, we compute the fraction again and compare the rounded // result. q := BinaryOp(Num(x), token.QUO, Denom(x)) got := q.String() want := x.String()
Denom is referenced in 7 repositoriesgithub.com/golang/go
- 1 reference in src/go/constant/value_test.go
- 1 reference in golang.org/x/tools/cmd/godex/print.go
- 1 reference in golang.org/x/tools/go/gcimporter15/bexport.go