This is a general problem due to the fact that pow(float,float) is not precise enough ?
The computed threshold return a float superior to the expected value.
Below, k=4, omega=8.
Expected thresold = (8/20)⁴ = 0.0256
# I get the values from xpas db
for (const auto& [f, p, m] : *entries)
[...]
# get the threshold in the xpas way, this return a float
auto _thr = xpas::score_threshold(_db.omega(), _db.kmer_size());
auto _thr_log = std::log10(_thr);
# for some reason, xpas return a float threshold > to the expected value
# p = -1.59176004
# _thr = 0.0256000012 (why ?)
# _thr_log = -1.59176004
This is a general problem due to the fact that pow(float,float) is not precise enough ?
The computed threshold return a float superior to the expected value. Below, k=4, omega=8. Expected thresold = (8/20)⁴ = 0.0256