Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
5bd61e06
Commit
5bd61e06
authored
Jul 29, 2013
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
math/big: better documentation for Rat.Float64
R=adonovan, r CC=golang-dev
https://golang.org/cl/11961043
parent
64db2ec9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/pkg/math/big/rat.go
src/pkg/math/big/rat.go
+3
-2
No files found.
src/pkg/math/big/rat.go
View file @
5bd61e06
...
@@ -164,8 +164,9 @@ func quotToFloat(a, b nat) (f float64, exact bool) {
...
@@ -164,8 +164,9 @@ func quotToFloat(a, b nat) (f float64, exact bool) {
}
}
// Float64 returns the nearest float64 value for x and a bool indicating
// Float64 returns the nearest float64 value for x and a bool indicating
// whether f represents x exactly. The sign of f always matches the sign
// whether f represents x exactly. If the magnitude of x is too large to
// of x, even if f == 0.
// be represented by a float64, f is an infinity and exact is false.
// The sign of f always matches the sign of x, even if f == 0.
func
(
x
*
Rat
)
Float64
()
(
f
float64
,
exact
bool
)
{
func
(
x
*
Rat
)
Float64
()
(
f
float64
,
exact
bool
)
{
b
:=
x
.
b
.
abs
b
:=
x
.
b
.
abs
if
len
(
b
)
==
0
{
if
len
(
b
)
==
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment