Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
45b4867d
Commit
45b4867d
authored
Nov 14, 2012
by
Robin Eklind
Committed by
Robert Griesemer
Nov 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strconv: Removed unnecessary use of goto. Made code easier to read.
R=gri CC=gobot, golang-dev
https://golang.org/cl/6855048
parent
63315c0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
extfloat.go
src/pkg/strconv/extfloat.go
+4
-12
No files found.
src/pkg/strconv/extfloat.go
View file @
45b4867d
...
...
@@ -152,22 +152,14 @@ func (f *extFloat) floatBits(flt *floatInfo) (bits uint64, overflow bool) {
// Infinities.
if
exp
-
flt
.
bias
>=
1
<<
flt
.
expbits
-
1
{
goto
overflow
}
// Denormalized?
if
mant
&
(
1
<<
flt
.
mantbits
)
==
0
{
exp
=
flt
.
bias
}
goto
out
overflow
:
// ±Inf
mant
=
0
exp
=
1
<<
flt
.
expbits
-
1
+
flt
.
bias
overflow
=
true
out
:
}
else
if
mant
&
(
1
<<
flt
.
mantbits
)
==
0
{
// Denormalized?
exp
=
flt
.
bias
}
// Assemble bits.
bits
=
mant
&
(
uint64
(
1
)
<<
flt
.
mantbits
-
1
)
bits
|=
uint64
((
exp
-
flt
.
bias
)
&
(
1
<<
flt
.
expbits
-
1
))
<<
flt
.
mantbits
...
...
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