Go to the first, previous, next, last section, table of contents.


exp2

Syntax

#include <math.h>

double exp2(double x);

Description

This function computes 2 to the power of x, 2^x.

Return Value

2 to the x power. If the value of x is finite, but so large in magnitude that 2^x cannot be accurately represented by a double, the return value is is the nearest representable double (possibly, an Inf), and errno is set to ERANGE. If x is either a positive or a negative infinity, the result is either +Inf or zero, respectively, and errno is not changed. If x is a NaN, the return value is NaN and errno is set to EDOM.

Portability

not ANSI, not POSIX


Go to the first, previous, next, last section, table of contents.