TString Atof() keep all the digitals


_ROOT Version: ROOT 6.14/00
_Platform: macosx64
_Compiler:clang++

Hallo,

I found the Atof() function of TString will cut the digitals. Is there any way to keep all of the digitals?

//************************************************************
root [0] TString a (“14931.21793” )

(TString &) “14931.21793”[11]

root [1] double cc

(double) 0.0000000

root [2] cc=a.Atof ()

(double) 14931.218

root [3] a

(TString &) “14931.21793”[11]

Try: std::cout << std::setprecision(10) << cc;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.