recursive formula evaluation