mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
math/big: document that Sqrt doesn't set Accuracy
Document that the Float.Sqrt method does not set the receiver's Accuracy field. Updates #37915 Change-Id: Ief1dcac07eacc0ef02f86bfac9044501477bca1c Reviewed-on: https://go-review.googlesource.com/c/go/+/224497 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
d965bb6130
commit
c5058652fd
2 changed files with 5 additions and 2 deletions
|
|
@ -224,7 +224,9 @@ func (x *Float) Mode() RoundingMode {
|
||||||
return x.mode
|
return x.mode
|
||||||
}
|
}
|
||||||
|
|
||||||
// Acc returns the accuracy of x produced by the most recent operation.
|
// Acc returns the accuracy of x produced by the most recent
|
||||||
|
// operation, unless explicitly documented otherwise by that
|
||||||
|
// operation.
|
||||||
func (x *Float) Acc() Accuracy {
|
func (x *Float) Acc() Accuracy {
|
||||||
return x.acc
|
return x.acc
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ var (
|
||||||
//
|
//
|
||||||
// If z's precision is 0, it is changed to x's precision before the
|
// If z's precision is 0, it is changed to x's precision before the
|
||||||
// operation. Rounding is performed according to z's precision and
|
// operation. Rounding is performed according to z's precision and
|
||||||
// rounding mode.
|
// rounding mode, but z's accuracy is not computed. Specifically, the
|
||||||
|
// result of z.Acc() is undefined.
|
||||||
//
|
//
|
||||||
// The function panics if z < 0. The value of z is undefined in that
|
// The function panics if z < 0. The value of z is undefined in that
|
||||||
// case.
|
// case.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue