macro | meaning when errno is set to this |
EDOM | Domain error: Some mathematical functions are only defined for certain real values, which is called its domain, for example the square root function is only defined for non-negative numbers, therefore the sqrt function sets errno to EDOM if called with a negative argument. |
ERANGE | Range error: The range of values that can be represented with a variable is limited. For example, mathematical functions such as pow can easily outbound the range representable by a floating point variable, or functions such as strtod can encounter sequences of digits longer than the range representable by an int value. In these cases, errno is set to ERANGE. |
EILSEQ | Illegal sequence: Multibyte character sequence may have a restricted set of valid sequences. When a set of multibyte characters is translated by functions such as mbrtowc, errno is set to EILSEQ when an invalid sequence is encountered. |