On this page
  1. pow
  2. Include
  3. Signature & Overview
  4. Notes & Pitfalls
  5. Example

pow

Prev: fabs | Up: math.h | Next: floor
Rel: math.h, math, time & assert Guide
Ref: cppreference — pow
Tags: #public #prog #c #stdlib #math #tier/standard


Include

#include <math.h>

Signature & Overview

double pow(double base, double exp);

Raises base to the power exp.

Notes & Pitfalls

Example

#include <assert.h>
#include <math.h>

int main(void) { assert(fabs(pow(2.0, 10.0) - 1024.0) < 1e-9); }

Linked from

Related notes