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

math/big: add Float.Sqrt #20460

Closed
ALTree opened this issue May 22, 2017 · 4 comments
Closed

math/big: add Float.Sqrt #20460

ALTree opened this issue May 22, 2017 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented May 22, 2017

From #14102

Add a Float method to compute square roots:

// Sqrt sets z to the square root of x, and returns z.
func (z *Float) Sqrt(x *Float) *Float
@rsc rsc added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label May 23, 2017
@rsc
Copy link
Contributor

rsc commented May 23, 2017

Thanks for creating the issue. If you'd like to work on this, I highly recommend Brent and Zimmerman, Modern Computer Arithmetic, available online at https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf. This is what I used for integer square root and some other things, and it looks like floating-point square root is covered as well.

As far as the API is concerned, I'm OK with the addition but will leave the final decision to Robert.

/cc @griesemer

@griesemer
Copy link
Contributor

I'm ok with sqrt for big.Floats. @ALTree if you plan to work on this, please implement this in a new file. Also, it may take a while before I get to reviewing it.

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels May 23, 2017
@rsc rsc added this to the Go1.10 milestone May 23, 2017
@ALTree
Copy link
Member Author

ALTree commented May 23, 2017

Thanks for the suggestions.

@griesemer no problem, there's plenty of time before the go1.10 freeze.

@gopherbot
Copy link

Change https://golang.org/cl/67830 mentions this issue: math/big: add (*Float).Sqrt

@golang golang locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants