Cache intermediate values in BINTREE2 and BINTREE3