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

This commit is contained in:
rlar 2013-04-28 13:50:13 +02:00
parent a5d131d8a5
commit f10d9f75c1
1 changed files with 6 additions and 6 deletions

View File

@ -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;
} }
} }