I not sure I understand your follow on question, but if you’re asking:
“Is it normal for square root calculations to return 0?”
The answer is, “Yes, if the value you are taking the square root is VERY small or zero.”
Also, it is better not to do anything that might result in a divide by zero. So, in this case doing that calculation in the call to sqrt() is a bad idea as it may result in a return value of 0.