ECS 30 Lecture Notes - Lecture 8: C Mathematical Functions, C Standard Library

16 views5 pages

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)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents