Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
Libraries
fmt
Commits
91819834
Commit
91819834
authored
Jan 12, 2022
by
Junekey Jeon
Committed by
Victor Zverovich
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix syntax errors
parent
74097a14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
include/fmt/format-inl.h
include/fmt/format-inl.h
+8
-7
No files found.
include/fmt/format-inl.h
View file @
91819834
...
...
@@ -936,7 +936,7 @@ bool check_divisibility_and_divide_by_pow10(uint32_t& n) FMT_NOEXCEPT {
}
infos
[]
=
{{
0x199a
,
8
,
8
},
{
0xa3d71
,
10
,
16
}};
constexpr
auto
info
=
infos
[
N
-
1
];
n
*=
info
.
magic_number
;
n
>>=
margin_bits
;
n
>>=
info
.
margin_bits
;
const
uint32_t
comparison_mask
=
(
1u
<<
info
.
divisibility_check_bits
)
-
1
;
bool
result
=
(
n
&
comparison_mask
)
==
0
;
n
>>=
info
.
divisibility_check_bits
;
...
...
@@ -2060,7 +2060,7 @@ template <typename T> decimal_fp<T> to_decimal(T x) FMT_NOEXCEPT {
// better than the compiler; we are computing zi / big_divisor here.
decimal_fp
<
T
>
ret_value
;
ret_value
.
significand
=
divide_by_10_to_kappa_plus_1
(
z_mul
.
result
);
const
uint32_t
r
=
static_cast
<
uint32_t
>
(
uint32_t
r
=
static_cast
<
uint32_t
>
(
z_mul
.
result
-
float_info
<
T
>::
big_divisor
*
ret_value
.
significand
);
if
(
r
>
deltai
)
{
...
...
@@ -2089,8 +2089,8 @@ template <typename T> decimal_fp<T> to_decimal(T x) FMT_NOEXCEPT {
goto
small_divisor_case_label
;
}
}
else
{
const
typename
cache_accessor
<
T
>::
compute_mul_parity_result
x_mul
=
=
compute_mul_parity
(
two_fl
,
cache
,
beta_minus_1
);
const
typename
cache_accessor
<
T
>::
compute_mul_parity_result
x_mul
=
c
ache_accessor
<
T
>::
c
ompute_mul_parity
(
two_fl
,
cache
,
beta_minus_1
);
if
(
!
x_mul
.
parity
&&
!
x_mul
.
is_integer
)
{
goto
small_divisor_case_label
;
}
...
...
@@ -2126,8 +2126,8 @@ small_divisor_case_label:
// Since there are only 2 possibilities, we only need to care about the
// parity. Also, zi and r should have the same parity since the divisor
// is an even number.
const
typename
cache_accessor
<
T
>::
compute_mul_parity_result
y_mul
=
=
compute_mul_parity
(
two_fc
,
cache
,
beta_minus_1
);
const
typename
cache_accessor
<
T
>::
compute_mul_parity_result
y_mul
=
c
ache_accessor
<
T
>::
c
ompute_mul_parity
(
two_fc
,
cache
,
beta_minus_1
);
if
(
y_mul
.
parity
!=
approx_y_parity
)
{
--
ret_value
.
significand
;
...
...
@@ -2140,8 +2140,9 @@ small_divisor_case_label:
:
ret_value
.
significand
-
1
;
}
}
return
ret_value
;
}
return
ret_value
;
}
}
// namespace dragonbox
// Formats a floating-point number using a variation of the Fixed-Precision
...
...
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