-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
math/big: Float.Format and Float.Scan conflict with the fmt Formatter and Scanner interfaces #10938
Labels
Milestone
Comments
Maybe |
@nightlyone There's already a (*Float).Parse. But yes, perhaps we don't need the Scan in the current form. |
CL https://golang.org/cl/10493 mentions this issue. |
CL https://golang.org/cl/10498 mentions this issue. |
griesemer
added a commit
that referenced
this issue
May 29, 2015
This paves the way for a fmt-compatible (*Float).Format method. A better name then Text is still desirable (suggestions welcome). This is partly fixing issue #10938. Change-Id: I59c20a8cee11f5dba059fe0f38b414fe75f2ab13 Reviewed-on: https://go-review.googlesource.com/10493 Reviewed-by: Alan Donovan <adonovan@google.com>
griesemer
added a commit
that referenced
this issue
May 29, 2015
- (*Float).Scan conflicted with fmt.Scanner.Scan; it was also only used internally. Removed it, as well as the companion ScanFloat function. - (*Float).Parse (and thus ParseFloat) can now also parse infinities. As a result, more code could be simplified. - Fixed a bug in rounding (round may implicitly be called for infinite values). Found via existing test cases, after simplifying some code. - Added more test cases. Fixes issue #10938. Change-Id: I1df97821654f034965ba8b82b272e52e6dc427f1 Reviewed-on: https://go-review.googlesource.com/10498 Reviewed-by: Alan Donovan <adonovan@google.com>
This was fixed with https://go-review.googlesource.com/#/c/10498/ . |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Need to find better names so that we can smoothly interoperate with the fmt package.
Suggestion (iant):
(_Float).Format becomes (_Float).Text.
(this makes it a bit different from the conventions in strconv, but it's the best suggestion seen so far).
Also need a suggestion for (*Float).Scan.
The text was updated successfully, but these errors were encountered: