Mathematical Library Detector
This C program detects the mathematical library you are using.
Simply compile it with you favorite compiler and run it:
$ gcc libm-detector.c -lm
$ ./a.out
Mathematical Library Detector, version 1.0
Probably libm shipped with GNU libc, version >= 2.29
The current version (1.0) only works on x86_64 processors, and
recognizes (see this
link):
- libm shipped with GNU libc
(distinguishes between version up to 2.16, between
2.17 and 2.28, and up from 2.29), where you can compile with
-DGLIBC to get the exact glibc version;
- Intel Math Library;
- musl (https://musl.libc.org/);
- AMD's libm;
- RedHat's libm (https://sourceware.org/newlib/);
- OpenLibm (https://openlibm.org/).
If your library is not recognized (or incorrectly recognized),
please contact me.