Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
8e494890
Commit
8e494890
authored
Jul 31, 2003
by
Per Cederqvist
Browse files
(check_one_stat): Fixed the logic that determines if we need to fix a
rounding error. Report the values using %g instead of %f.
parent
a15c6b89
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/stats.c
View file @
8e494890
...
...
@@ -323,11 +323,11 @@ check_one_stat(enum stat_type st,
err
=
acc
-
s
->
avenrun
[
f
];
if
(
err
<
0
)
err
=
-
err
;
if
((
acc
<
1
e-6
&&
err
>
1e
-
5
)
||
(
acc
>=
1
e-6
&&
err
/
acc
>
0
.
01
))
if
((
acc
<
1
&&
err
>
1e5
*
acc
)
||
(
acc
>=
1
&&
err
/
acc
>
1e-5
))
{
kom_log
(
"Accumulated rounding errors fixed (%s) after"
" %ld updates (st=%d, vt=%d, f=%d, factor=%d): %
f
=> %
f
\n
"
,
" %ld updates (st=%d, vt=%d, f=%d, factor=%d): %
g
=> %
g
\n
"
,
when
,
s
->
updates
[
f
],
st
,
vt
,
f
,
factors
[
f
],
s
->
avenrun
[
f
],
acc
);
s
->
avenrun
[
f
]
=
acc
;
...
...
Write
Preview
Supports
Markdown
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