summaryrefslogtreecommitdiff
path: root/libgo/go/math/big/floatexample_test.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-14 00:05:42 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-14 00:05:42 +0000
commitccea2b367771831e9877ec31e0656d153818bf3f (patch)
treee183ae81a1f48a02945cb6de463a70c5be1b06f6 /libgo/go/math/big/floatexample_test.go
parentfd961cec64a5807cd6375d5c4042bca4256c5fda (diff)
downloadgcc-ccea2b367771831e9877ec31e0656d153818bf3f.tar.gz
libgo: update to Go 1.8 release candidate 1
Compiler changes: * Change map assignment to use mapassign and assign value directly. * Change string iteration to use decoderune, faster for ASCII strings. * Change makeslice to take int, and use makeslice64 for larger values. * Add new noverflow field to hmap struct used for maps. Unresolved problems, to be fixed later: * Commented out test in go/types/sizes_test.go that doesn't compile. * Commented out reflect.TestStructOf test for padding after zero-sized field. Reviewed-on: https://go-review.googlesource.com/35231 gotools/: Updates for Go 1.8rc1. * Makefile.am (go_cmd_go_files): Add bug.go. (s-zdefaultcc): Write defaultPkgConfig. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/math/big/floatexample_test.go')
-rw-r--r--libgo/go/math/big/floatexample_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/math/big/floatexample_test.go b/libgo/go/math/big/floatexample_test.go
index 05bce613a80..8645c44f103 100644
--- a/libgo/go/math/big/floatexample_test.go
+++ b/libgo/go/math/big/floatexample_test.go
@@ -13,7 +13,7 @@ import (
)
func ExampleFloat_Add() {
- // Operating on numbers of different precision.
+ // Operate on numbers of different precision.
var x, y, z big.Float
x.SetInt64(1000) // x is automatically set to 64bit precision
y.SetFloat64(2.718281828) // y is automatically set to 53bit precision
@@ -28,8 +28,8 @@ func ExampleFloat_Add() {
// z = 1002.718282 (0x.faadf854p+10, prec = 32, acc = Below)
}
-func Example_Shift() {
- // Implementing Float "shift" by modifying the (binary) exponents directly.
+func ExampleFloat_shift() {
+ // Implement Float "shift" by modifying the (binary) exponents directly.
for s := -5; s <= 5; s++ {
x := big.NewFloat(0.5)
x.SetMantExp(x, x.MantExp(nil)+s) // shift x by s