summaryrefslogtreecommitdiff
path: root/src/matrixOperations/hilbert
diff options
context:
space:
mode:
Diffstat (limited to 'src/matrixOperations/hilbert')
-rw-r--r--src/matrixOperations/hilbert/dhilba.c4
-rw-r--r--src/matrixOperations/hilbert/shilba.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/matrixOperations/hilbert/dhilba.c b/src/matrixOperations/hilbert/dhilba.c
index 10e9bc65..6c47227f 100644
--- a/src/matrixOperations/hilbert/dhilba.c
+++ b/src/matrixOperations/hilbert/dhilba.c
@@ -22,7 +22,7 @@ void dhilba ( double* out, int size ){
for(iIndex1 = 0 ; iIndex1 < size ; iIndex1++)
{
if(iIndex1 != 0)
- dblVal = ((size - iIndex1) * dblVal * (size + iIndex1)) / pow(iIndex1,2);
+ dblVal = ((size - iIndex1) * dblVal * (size + iIndex1)) / pow((double)iIndex1,2);
dblTemp = dblVal * dblVal;
@@ -33,7 +33,7 @@ void dhilba ( double* out, int size ){
for(iIndex2 = iIndex1 + 1 ; iIndex2 < size ; iIndex2++)
{
- dblTemp = -((size - iIndex2) * dblTemp * (size + iIndex2)) / pow(iIndex2,2);
+ dblTemp = -((size - iIndex2) * dblTemp * (size + iIndex2)) / pow((double)iIndex2,2);
out[iIndex1 * size + iIndex2] = dblTemp / (iIndex1 + iIndex2 + 1);
out[iIndex2 * size + iIndex1] = out[iIndex1 * size + iIndex2];
}
diff --git a/src/matrixOperations/hilbert/shilba.c b/src/matrixOperations/hilbert/shilba.c
index 5d0a0d36..bd3b5ee5 100644
--- a/src/matrixOperations/hilbert/shilba.c
+++ b/src/matrixOperations/hilbert/shilba.c
@@ -23,7 +23,7 @@ void shilba ( float* out, int size ){
for(iIndex1 = 0 ; iIndex1 < size ; iIndex1++)
{
if(iIndex1 != 0)
- dblVal = ((float)(size - iIndex1) * dblVal * (float)(size + iIndex1)) /(float) pow(iIndex1,2);
+ dblVal = ((float)(size - iIndex1) * dblVal * (float)(size + iIndex1)) /(float) pow((double)iIndex1,2);
dblTemp = dblVal * dblVal;
@@ -34,7 +34,7 @@ void shilba ( float* out, int size ){
for(iIndex2 = iIndex1 + 1 ; iIndex2 < size ; iIndex2++)
{
- dblTemp = -((float)(size - iIndex2) * dblTemp *(float) (size + iIndex2)) /(float) pow(iIndex2,2);
+ dblTemp = -((float)(size - iIndex2) * dblTemp *(float) (size + iIndex2)) /(float) pow((double)iIndex2,2);
out[iIndex1 * size + iIndex2] = dblTemp /(float) (iIndex1 + iIndex2 + 1);
out[iIndex2 * size + iIndex1] = out[iIndex1 * size + iIndex2];
}