The format "%6.4g"
gives 4 most significant decimal digits precision.
You could try (printing format for fit parameters in the stat box): gStyle->SetFitFormat("14.7g");
In the screenshot, all values of parameters and their errors are given with 6 most significant decimal digits precision.
The “p0” is around 5e-8
, and its error is around 4e-9
, so it’s around 8% (i.e., just 1 order of magnitude smaller than the value itself, and you get them both with 6 digits).
You can print this value with more digits, e.g.:
printf("p0 = %24.17g +- %24.17g\n", your_fit_function->GetParameter(0), your_fit_function->GetParError(0));