[...] number. As I showed in my article on how to handle negative values in a log function, you can use the SAS/IML CHOOSE function to return missing values: y2 = sqrt( choose(x>=0, x, .) ); print (x//y2)[r={"x" "sqrt(x) or …