Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: missing truncation error #20750
Spec says every implementation must:
Implementation restriction: Although numeric constants have arbitrary precision in the language, a compiler may implement them using an internal representation with limited precision. That said, every implementation must:
go/types uses rational numbers for constants and doesn't round (the result is always exact *). Thus,
(* There's an escape hatch where even go/types moves to a big.Float representation in situations where the rational number components become so large as to make it practically impossible for the compiler to finish constant arithmetic in a reasonable amount of time, but that only kicks in in extreme cases).
Closing as implementation restriction.