Each of the macros defined in <errno.h> expands to an integer constant expression with type int and with a unique positive value. The following constants are defined by ISO C. The implementation may define more, as long as they begin with 'E' followed by digits or uppercase letters.
Mathematics argument out of domain of functionMany additional errno constants are defined by POSIX and by the C++ standard library, and individual implementations may define even more, e.g. errno(3) on Linux or intro(2) on BSD and OS X.
[edit] Example#include <errno.h> #include <math.h> #include <stdio.h> #include <string.h> int main(void) { errno = 0; printf("log(-1.0) = %f\n", log(-1.0)); printf("%s\n\n", strerror(errno)); errno = 0; printf("log(0.0) = %f\n", log(0.0)); printf("%s\n", strerror(errno)); }
Possible output:
log(-1.0) = nan Numerical argument out of domain log(0.0) = -inf Numerical result out of range[edit] References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4