Browse Source

sparse/*.c, drop unnecessary (double) cast

pre-master-46
rlar 13 years ago
parent
commit
f10d9f75c1
  1. 12
      src/maths/sparse/spoutput.c

12
src/maths/sparse/spoutput.c

@ -297,7 +297,7 @@ spPrint(MatrixPtr eMatrix, int PrintReordered, int Data, int Header)
{ {
/* Case where element exists */ /* Case where element exists */
if (Data) if (Data)
printf(" %9.3g", (double)pElement->Real);
printf(" %9.3g", pElement->Real);
else else
putchar('x'); putchar('x');
@ -328,7 +328,7 @@ spPrint(MatrixPtr eMatrix, int PrintReordered, int Data, int Header)
if (pImagElements[J - StartCol] != NULL) if (pImagElements[J - StartCol] != NULL)
{ {
printf(" %8.2gj", printf(" %8.2gj",
(double)pImagElements[J-StartCol]->Imag);
pImagElements[J-StartCol]->Imag);
} }
else printf(" "); else printf(" ");
} }
@ -520,7 +520,7 @@ spFileMatrix(MatrixPtr eMatrix, char *File, char *Label, int Reordered,
} }
Err = fprintf Err = fprintf
( pMatrixFile,"%d\t%d\t%-.15g\t%-.15g\n", ( pMatrixFile,"%d\t%d\t%-.15g\t%-.15g\n",
Row, Col, (double)pElement->Real, (double)pElement->Imag
Row, Col, pElement->Real, pElement->Imag
); );
if (Err < 0) return 0; if (Err < 0) return 0;
pElement = pElement->NextInCol; pElement = pElement->NextInCol;
@ -543,7 +543,7 @@ spFileMatrix(MatrixPtr eMatrix, char *File, char *Label, int Reordered,
Col = Matrix->IntToExtColMap[I]; Col = Matrix->IntToExtColMap[I];
Err = fprintf Err = fprintf
( pMatrixFile,"%d\t%d\t%-.15g\n", ( pMatrixFile,"%d\t%d\t%-.15g\n",
Row, Col, (double)pElement->Real
Row, Col, pElement->Real
); );
if (Err < 0) return 0; if (Err < 0) return 0;
pElement = pElement->NextInCol; pElement = pElement->NextInCol;
@ -623,7 +623,7 @@ spFileVector(MatrixPtr eMatrix, char *File, RealVector RHS, RealVector iRHS)
{ {
Err = fprintf Err = fprintf
( pMatrixFile, "%-.15g\t%-.15g\n", ( pMatrixFile, "%-.15g\t%-.15g\n",
(double)RHS[I], (double)iRHS[I]
RHS[I], iRHS[I]
); );
if (Err < 0) return 0; if (Err < 0) return 0;
} }
@ -632,7 +632,7 @@ spFileVector(MatrixPtr eMatrix, char *File, RealVector RHS, RealVector iRHS)
{ {
for (I = 1; I <= Size; I++) for (I = 1; I <= Size; I++)
{ {
if (fprintf(pMatrixFile, "%-.15g\n", (double)RHS[I]) < 0)
if (fprintf(pMatrixFile, "%-.15g\n", RHS[I]) < 0)
return 0; return 0;
} }
} }

Loading…
Cancel
Save