#include "qual_utils.h"

const double QualityUtils::PHRED_TO_LOG_PROB_MULTIPLIER = -std::log(10) / 10.0;

const double QualityUtils::LOG_PROB_TO_PHRED_MULTIPLIER = 1 / PHRED_TO_LOG_PROB_MULTIPLIER;

const double QualityUtils::MIN_LOG10_SCALED_QUAL = std::log10(DBL_MIN);

const double QualityUtils::MIN_PHRED_SCALED_QUAL = -10.0 * MIN_LOG10_SCALED_QUAL;

double QualityUtils::qualToErrorProbCache[MAX_QUAL + 1];
double QualityUtils::qualToProbLog10Cache[MAX_QUAL + 1];