could a description of how the QUAL number works be provided.

Clearly this is not just a simple number and understanding how it's produced could help admin with interpreting variance files.