v2{4} calculation code