Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
562e4f53
Commit
562e4f53
authored
Sep 23, 2011
by
Daniel Fischer
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
b879b2a4
d9f48df3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
strings/dtoa.c
strings/dtoa.c
+9
-5
No files found.
strings/dtoa.c
View file @
562e4f53
...
@@ -1009,6 +1009,7 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
...
@@ -1009,6 +1009,7 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
Bigint
*
b1
,
*
p5
,
*
p51
=
NULL
;
Bigint
*
b1
,
*
p5
,
*
p51
=
NULL
;
int
i
;
int
i
;
static
int
p05
[
3
]
=
{
5
,
25
,
125
};
static
int
p05
[
3
]
=
{
5
,
25
,
125
};
my_bool
overflow
=
FALSE
;
if
((
i
=
k
&
3
))
if
((
i
=
k
&
3
))
b
=
multadd
(
b
,
p05
[
i
-
1
],
0
,
alloc
);
b
=
multadd
(
b
,
p05
[
i
-
1
],
0
,
alloc
);
...
@@ -1027,16 +1028,19 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
...
@@ -1027,16 +1028,19 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
if
(
!
(
k
>>=
1
))
if
(
!
(
k
>>=
1
))
break
;
break
;
/* Calculate next power of 5 */
/* Calculate next power of 5 */
if
(
p5
<
p5_a
+
P5A_MAX
)
if
(
overflow
)
++
p5
;
else
if
(
p5
==
p5_a
+
P5A_MAX
)
p5
=
mult
(
p5
,
p5
,
alloc
);
else
{
{
p51
=
mult
(
p5
,
p5
,
alloc
);
p51
=
mult
(
p5
,
p5
,
alloc
);
Bfree
(
p5
,
alloc
);
Bfree
(
p5
,
alloc
);
p5
=
p51
;
p5
=
p51
;
}
}
else
if
(
p5
<
p5_a
+
P5A_MAX
)
++
p5
;
else
if
(
p5
==
p5_a
+
P5A_MAX
)
{
p5
=
mult
(
p5
,
p5
,
alloc
);
overflow
=
TRUE
;
}
}
}
if
(
p51
)
if
(
p51
)
Bfree
(
p51
,
alloc
);
Bfree
(
p51
,
alloc
);
...
...
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