summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/radix_conversions
diff options
context:
space:
mode:
authorsiddhu89902017-05-22 15:13:54 +0530
committersiddhu89902017-05-22 15:13:54 +0530
commitb33afdb2311fbe8aad4c5c614c6098585fe2d279 (patch)
tree3d8db91388dab60159248fb0cfef160ca03cefeb /src/c/elementaryFunctions/radix_conversions
parentf0e074cc43f04f58aafe00742b9748a09f77894f (diff)
parente36eac94dd517bb69d3e5782516ee58942451991 (diff)
downloadScilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.gz
Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.bz2
Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.zip
Bugs fixed for Scilab 6.0
Diffstat (limited to 'src/c/elementaryFunctions/radix_conversions')
-rw-r--r--src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c7
-rw-r--r--src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c
index 43e3686..811a411 100644
--- a/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c
+++ b/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c
@@ -159,12 +159,7 @@ double gbase2decs(char* in,int size,int base)
val = 35;
break;
}
- o = o + (val * pow(base, size));
- //printf("%f\n",out[0]);
- //o=(int)out[0];
- //o=o/16;
- //printf("%d %d %d\n",o,val,(val * pow(16, size)));
- //j++;
+ o = o + (val * (int)pow((double)base, size));
size--;
}
return o;
diff --git a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c
index 8722df1..eb42a7a 100644
--- a/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c
+++ b/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c
@@ -80,12 +80,7 @@ double ghex2decs(char* in,int size)
val = 15;
break;
}
- o = o + (val * pow(16, size));
- //printf("%f\n",out[0]);
- //o=(int)out[0];
- //o=o/16;
- //printf("%d %d %d\n",o,val,(val * pow(16, size)));
- //j++;
+ o = o + (val * (int)pow((double)16, size));
size--;
}
return o;