double CDECL MSVCRT_atan( double x ) { - if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; return atan(x); } I've done a little more testing. The function is not setting errno in INF and -INF case. It does set errno to EDOM when argument is NAN.
double CDECL MSVCRT_atan( double x ) { - if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; return atan(x); }