Verified Commit fd518777 authored by Tim Gymnich's avatar Tim Gymnich
Browse files

fixed printing of floats

parent 910d9bef
......@@ -396,9 +396,9 @@ llvm::raw_ostream& operator<<(llvm::raw_ostream& os, Matrix<T> const& matrix) {
for (int column = 0; column < matrix.getWidth(); column++) {
if constexpr (std::is_floating_point_v<T>) {
if (column == matrix.getWidth() - 1) {
os << llvm::format("%.f", matrix.value(row,column));
os << llvm::format("%g", matrix.value(row,column));
} else {
os << llvm::format("%-6.f", matrix.value(row,column));
os << llvm::format("%-6g", matrix.value(row,column));
}
} else {
if (column == matrix.getWidth() - 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment