use literal float
diff --git a/bn_mp_get_double.c b/bn_mp_get_double.c
index 542993d..ea78b9f 100644
--- a/bn_mp_get_double.c
+++ b/bn_mp_get_double.c
@@ -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);