You don't need to worry about the 5V vs 10V thing. The input to the voltage divider is 0-10V. The analogRead() gives you a corresponding value 0-1023. The fact that it went through a stage when it was 0-5V is irrelevant.
But this is a problem:
The map() function uses integer math so will not generate fractions, when the math might indicate that it should do so. Fractional remainders are truncated, and are not rounded or averaged.
So map() will only give you 0,1,2,3...,9. It will never give you 3.88 for example.
You need something more like:
v = v * 10.0 / 1024.0;