In order to provide the additional overloads for the mathematical functions, as required by the C++11 standard section 26.8 [c.math] paragraph 11, the VS 2012 standard library implementation defines general function templates for all 2-argument mathematical functions, resolving to a common return type.
However those templates can be instantiated with arbitrary types and not just the builtin arithmetic types, which I think is erroneous behavior. At least it is inconsistent to the 1-argument functions, which provide overloads only for the builtin arithmetic types.(Although the standard wording is not completely clear about this, there is already Standard Library Defect Report 2086 regarding this unclear wording. A solution is on its way to be incorporated into the standard, which finally requires those additional overloads to be only defined for arithmetic types, which seemed to have been the original intent all along.)
A simple 'std::enable_if' (or a similar SFINAE solution) checking for 'std::is_arithmetic' would solve the problem. This is already done by the current implementation for the 1-argument functions, which have an appropriate 'std::enable_if' checking for 'std::is_integral'.