Print float with number of signif digits, double with 8.
This commit is contained in:
parent
1ac9f65512
commit
56b0e8e184
@ -330,13 +330,13 @@ namespace cling {
|
||||
// Reals
|
||||
std::string printValue(const float *val) {
|
||||
cling::smallstream strm;
|
||||
strm << llvm::format("%#.5g", *val) << 'f';
|
||||
strm << llvm::format("%#.6g", *val) << 'f';
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
std::string printValue(const double *val) {
|
||||
cling::smallstream strm;
|
||||
strm << llvm::format("%#.6g", *val);
|
||||
strm << llvm::format("%#.8g", *val);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user