dequantTernary