Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
C standard library
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Linking, libm === Under FreeBSD<ref>{{cite web |title=Compiling with cc |url=http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/tools-compiling.html |access-date=2 March 2013}}</ref> and glibc,<ref>{{cite web |last1=Weimer |first1=Florian |title=c - What functions is the libm intended for? |url=https://stackoverflow.com/questions/54054925/what-functions-is-the-libm-intended-for |website=Stack Overflow |access-date=24 February 2021}}</ref> some functions such as sin() are not linked in by default and are instead bundled in the mathematical library [[libm]]. If any of them are used, the linker must be given the directive <code>-lm</code>. POSIX requires that the c99 compiler supports <code>-lm</code>, and that the functions declared in the headers <code>math.h</code>, <code>complex.h</code>, and <code>fenv.h</code> are available for linking if <code>-lm</code> is specified, but does not specify if the functions are linked by default.<ref>{{cite web |title=c99 - compile standard C programs |url=https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html |website=The Open Group Base Specifications Issue 7, 2018 edition |publisher=The Open Group |access-date=24 February 2021}}</ref> musl satisfies this requirement by putting everything into a single libc library and providing an empty libm.<ref>{{cite web |title=musl FAQ |url=https://www.musl-libc.org/faq.html |website=www.musl-libc.org |access-date=24 February 2021}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)