When a user selects a math function from the math node such as sin() or abs() that only requires one input, there are still two sockets available. This could lead to some confusion as to which socket the user should use.
This patch hides the second socket for each of the following math functions: SIN, COS, TAN, ASIN, ACOS, ATAN, ROUND, and ABS. It replaces the second socket for any other math function. It also removes the code to check whether there is input in the first socket for each of the functions, as this is no longer needed since there is only one visible socket for each of these functions.
I have only done the shader math nodes in this patch, I'll work on the composite and texture throughout the week.