Inhaltsverzeichnis

exp2()

#include <cmath>

double exp2 (double x) 

Liefert $2^x$.

Parameter

x reeller Exponent

Ergebnis

Rückgabewert: Potenz $2^x$.

Bei zu großem x tritt ein Bereichsfehler auf (errno = ERANGE).

Siehe auch

log2(), pow().

Beispiel

exp2.cpp
#include <cmath>
#include <iostream>
 
int main()
{
  std::cout << "2^10 = " << std::exp2(10.0) << '\n';
}