Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dr. Michael Petter
LLVM-abstractinterpretation
Commits
fd518777
Verified
Commit
fd518777
authored
Mar 16, 2020
by
Tim Gymnich
Browse files
fixed printing of floats
parent
910d9bef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/matrix.h
View file @
fd518777
...
...
@@ -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
(
"%-6
g
"
,
matrix
.
value
(
row
,
column
));
}
}
else
{
if
(
column
==
matrix
.
getWidth
()
-
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment