Double to float conversion for matrix.