From the course: C Standard Library

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Powers and exponentials

Powers and exponentials - C Tutorial

From the course: C Standard Library

Start my 1-month free trial

Powers and exponentials

- [Instructor] Let's now see a family of functions that involve raising a number to some power. These functions are powers and exponentials. Their inverse operations are roots and logarithms. For powers, we get the pow function, which returns the result of raising a base to an exponent. This is the doubling limitation of the function. For exponentials, we have two basic functions. Exp, which raises the constant E to the power sent as an argument, and exp2, which raises two to the power sent as an argument. There are three root calculating functions. The square root function, the cubic root function, and the hypotenuse function, which computes the square root of X squared plus Y squared. Finally, we have three basic logarithm functions. Log, which computes the base E, or natural logarithm. And we have log2 for base two, that's in the binary numbering system. And log10 for base 10, that's decimal.

Contents