Well I have some time scheduled after a raid tonight to go digging deeper into calculations and what not with the addon rather than a quick fix as it's currently at, so that comment will be a big help!

The first two are "rare" the last two are "epic" but this is irrelevant to the stat budget.
Bottom-line:
While the item value formula you are referencing was valid for previous expansions quality multipliers are entirely obsolete and should be removed from the calculation.

This change is not exactly advertised by Blizz for obvious (QQ prevention) reasons but this is how things stand.