x/tools/go/gcimporter15: simplify handling of float constants #14617
Labels
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
The
(*exporter).float(constant.Value)
method ofgolang.org/x/tools/go/gcimporter15
is excessively complex and does not handle extreme cases correctly because the abstractconstant.Value
API provides no easy way to access the big.Rat or big.Float that aValue
contains.The API should make it possible to obtain a big.Float from a constant.Value without thinking about arithmetic. As a side effect, the incorrect cases would go away.
The text was updated successfully, but these errors were encountered: