recursion calc.js