added square root scalar function

add sensible error message