Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/gcimporter15: simplify handling of float constants #14617

Open
alandonovan opened this issue Mar 3, 2016 · 0 comments

Comments

@alandonovan
Copy link
Contributor

commented Mar 3, 2016

The (*exporter).float(constant.Value) method of golang.org/x/tools/go/gcimporter15 is excessively complex and does not handle extreme cases correctly because the abstract constant.Value API provides no easy way to access the big.Rat or big.Float that a Value 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.

@bradfitz bradfitz modified the milestone: Unreleased Apr 9, 2016

@gopherbot gopherbot added the Tools label Sep 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.