fix denominator bug in memo-free computation