use literal float

This commit is contained in:
Francois Perrad 2018-11-28 10:42:11 +01:00
parent 17f382c549
commit 6f652de71e
1 changed files with 2 additions and 2 deletions

View File

@ -16,9 +16,9 @@
double mp_get_double(const mp_int *a)
{
int i;
double d = 0, fac = 1;
double d = 0.0, fac = 1.0;
for (i = 0; i < DIGIT_BIT; ++i) {
fac *= 2;
fac *= 2.0;
}
for (i = USED(a); i --> 0;) {
d = d * fac + (double)DIGIT(a, i);