Skip to content

Commit e09ac91

Browse files
author
Christian Schulte
committed
Fixed printing of float values and variables
1 parent 255b4ac commit e09ac91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gecode/float/val.hpp

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ namespace Gecode {
358358
template<class Char, class Traits>
359359
std::basic_ostream<Char,Traits>&
360360
operator <<(std::basic_ostream<Char,Traits>& os, const FloatVal& x) {
361-
return os << x.x;
361+
return os << '[' << x.min() << ".." << x.max() << ']';
362362
}
363363

364364
forceinline FloatVal

gecode/float/view/print.hpp

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ namespace Gecode { namespace Float {
4646
std::basic_ostringstream<Char,Traits> s;
4747
s.copyfmt(os); s.width(0);
4848
if (x.assigned()) {
49-
s << x.med();
49+
s << "[[" << x.med() << "]]";
5050
} else {
51-
s << '[' << x.min() << ".." << x.max() << ']';
51+
s << "[[" << x.min() << ".." << x.max() << "]]";
5252
}
5353
return os << s.str();
5454
}

0 commit comments

Comments
 (0)