`PDFSet::uncertainty` is broken in 6.5.0
The easiest way to reproduce it is the example:
./testpdfunc NNPDF31_nnlo_as_0118
which fails with
LHAPDF 6.5.0 loading all 101 PDFs in set NNPDF31_nnlo_as_0118
NNPDF31_nnlo_as_0118, version 1; 101 PDF members
ErrorType: replicas
ErrorConfLevel: -1
Gluon distribution at Q = 100 GeV (normal uncertainties)
PDF uncertainties on xg computed with NNPDF31_nnlo_as_0118 at CL=-1%
terminate called after throwing an instance of 'LHAPDF::UserError'
what(): Error in LHAPDF::PDFSet::uncertainty. Requested or PDF set confidence level outside [0,1] range.
Aborted
The problem seems to be whenever the default value is selected, see here: https://gitlab.com/hepcedar/lhapdf/-/blob/main/src/PDFSet.cc#L129. Replacing in that line CL1SIGMA with CL1SIGMA / 100.0 fixes the problem.