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
605ee5a3
Commit
605ee5a3
authored
Jan 16, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/split/Split/ to get compiling again
R=rsc OCL=22967 CL=22967
parent
db1656f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/lib/strconv/fp_test.go
src/lib/strconv/fp_test.go
+3
-3
No files found.
src/lib/strconv/fp_test.go
View file @
605ee5a3
...
@@ -27,7 +27,7 @@ func pow2(i int) float64 {
...
@@ -27,7 +27,7 @@ func pow2(i int) float64 {
// Wrapper around strconv.Atof64. Handles dddddp+ddd (binary exponent)
// Wrapper around strconv.Atof64. Handles dddddp+ddd (binary exponent)
// itself, passes the rest on to strconv.Atof64.
// itself, passes the rest on to strconv.Atof64.
func
myatof64
(
s
string
)
(
f
float64
,
ok
bool
)
{
func
myatof64
(
s
string
)
(
f
float64
,
ok
bool
)
{
a
:=
strings
.
s
plit
(
s
,
"p"
);
a
:=
strings
.
S
plit
(
s
,
"p"
);
if
len
(
a
)
==
2
{
if
len
(
a
)
==
2
{
n
,
err
:=
strconv
.
Atoi64
(
a
[
0
]);
n
,
err
:=
strconv
.
Atoi64
(
a
[
0
]);
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -71,7 +71,7 @@ func myatof64(s string) (f float64, ok bool) {
...
@@ -71,7 +71,7 @@ func myatof64(s string) (f float64, ok bool) {
// Wrapper around strconv.Atof32. Handles dddddp+ddd (binary exponent)
// Wrapper around strconv.Atof32. Handles dddddp+ddd (binary exponent)
// itself, passes the rest on to strconv.Atof32.
// itself, passes the rest on to strconv.Atof32.
func
myatof32
(
s
string
)
(
f
float32
,
ok
bool
)
{
func
myatof32
(
s
string
)
(
f
float32
,
ok
bool
)
{
a
:=
strings
.
s
plit
(
s
,
"p"
);
a
:=
strings
.
S
plit
(
s
,
"p"
);
if
len
(
a
)
==
2
{
if
len
(
a
)
==
2
{
n
,
err
:=
strconv
.
Atoi
(
a
[
0
]);
n
,
err
:=
strconv
.
Atoi
(
a
[
0
]);
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -116,7 +116,7 @@ export func TestFp(t *testing.T) {
...
@@ -116,7 +116,7 @@ export func TestFp(t *testing.T) {
if
len
(
line
)
==
0
||
line
[
0
]
==
'#'
{
if
len
(
line
)
==
0
||
line
[
0
]
==
'#'
{
continue
continue
}
}
a
:=
strings
.
s
plit
(
line
,
" "
);
a
:=
strings
.
S
plit
(
line
,
" "
);
if
len
(
a
)
!=
4
{
if
len
(
a
)
!=
4
{
t
.
Error
(
"testfp.txt:"
,
lineno
,
": wrong field count
\n
"
);
t
.
Error
(
"testfp.txt:"
,
lineno
,
": wrong field count
\n
"
);
continue
;
continue
;
...
...
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