# Thread: Need Help with Recursive Function talking in a value and splitting in half

1. ## Need Help with Recursive Function talking in a value and splitting in half

Figured this out, thanks. 2. Dividing by 0.5 is the same as multiplying by 2. Shouldn't you be dividing by 2 (or multiplying by 0.5)?

And if your base case returns 1 then that's the value that will be recursively divided by 2. Maybe try returning iniV since that's the value that you want to work on. 3. figured it out, thank you though.

I was returning 1 instead of the initial value for the base case. Also where I was multiplying the 1/2 when the recursive case was being done was outside when it should of been inside the passed parameters. 4. The dividing by two can be in either position, actually, although doing it to the function argument instead of the return value is more efficient since it allows tail recursion.

The actual problems are as I stated in my first post. Popular pages Recent additions function, initial, iteration, recursive, time 