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
LSH
lsh
Commits
119b4e8f
Commit
119b4e8f
authored
Nov 04, 2008
by
Niels Möller
Browse files
(main): Avoid using gmp_fprintf, to stay compatible with gmp-3.1.
Rev: nettle/examples/next-prime.c:1.3
parent
c5356829
Changes
1
Hide whitespace changes
Inline
Side-by-side
nettle/examples/next-prime.c
View file @
119b4e8f
...
...
@@ -145,9 +145,11 @@ main(int argc, char **argv)
mpz_init
(
d
);
mpz_sub
(
d
,
p
,
n
);
gmp_fprintf
(
stderr
,
"bit size: %lu, diff: %Zd, total time: %.3g s
\n
"
,
mpz_sizeinbase
(
p
,
2
),
d
,
(
double
)(
end
-
start
)
/
CLOCKS_PER_SEC
);
/* Avoid using gmp_fprintf, to stay compatible with gmp-3.1. */
fprintf
(
stderr
,
"bit size: %lu, diff: "
,
(
unsigned
long
)
mpz_sizeinbase
(
p
,
2
));
mpz_out_str
(
stderr
,
10
,
d
);
fprintf
(
stderr
,
", total time: %.3g s
\n
"
,
(
double
)(
end
-
start
)
/
CLOCKS_PER_SEC
);
}
return
EXIT_SUCCESS
;
}
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