exp2(), exp2f(), exp2l() — Calculate the base-2 exponential

Standards

Standards / Extensions C or C++ Dependencies
C99
Single UNIX Specification, Version 3
C++ TR1 C99
both z/OS® V1R7

Format

#define _ISOC99_SOURCE
#include <math.h>

double exp2(double x);
float exp2f(float x);
long double exp2l(long double x);
C++ TR1 C99:
#define _TR1_C99
#include <math.h>

float exp2(float x);
long double exp2(long double x);

General description

The exp2 functions compute the base-2 exponential of x.
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
exp2 X X
exp2f X X
exp2l X X

Returned value

The exp2 functions return 2 to the power x.

Related information