ECS 30 Lecture Notes - Lecture 8: C Mathematical Functions, C Standard Library
Document Summary
Library functions: c standard library (libc) Lots of functions and variables are already included in the c library. Collection of macros, type de nitions and functions. Accessible through various headers (29 as of today) Implicitly accessible via compiler: includes functions such as time, islower/isupper, etc. Wednesday, 18 april 2018: mathematical library (libm) All functions use oat type numbers: double by default, but can be changed to oat for ef ciency when double is not needed. (pow) - double by default; becomes a oat with suf x (powf) Speci ed in the compiler as -lm: mandatory speci cation, error otherwise. Functions must be declared before use, since complier reads c les top to bottom. De ne all functions above the main function if you want to use them: if you have to de ne the function after, use a prototype (above the main func)