repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libgo: update to go1.9
[official-gcc.git]
/
libgo
/
go
/
math
/
example_test.go
blob
12e9876730edf6a9af9296e89ed62c95262bd782
1
// Copyright 2017 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
5
package
math_test
6
7
import
(
8
"fmt"
9
"math"
10
)
11
12
func
ExampleSqrt
() {
13
const
(
14
a
=
3
15
b
=
4
16
)
17
c
:=
math
.
Sqrt
(
a
*
a
+
b
*
b
)
18
fmt
.
Printf
(
"%.1f"
,
c
)
19
// Output: 5.0
20
}