Changing output precision at RESTDebug

When using std::cout it is possible to change the output precision using std::cout.precision(12).

Using std::cout.precision(12) has no effect over RESTDebug output. Also, it is not possible to do RESTDebug.precision(12).

@nkx @juanan318 Do you know if it would be easy to implement something to change precision on REST output levels?

You can try

RESTDebug<<std::setprecision(12)<<myVal<<RESTendl;

It seems to work in the terminal, inside a library perhaps you have to #include <iomanip>

image

It would be possible to add setprecision to TRestStringOutput but perhaps you are happy with the solution above.

1 Like