Latest web development tutorials

C-Bibliotheksfunktionen - exp ()

C Standard-Bibliothek - <math.h> C Standard - Bibliothek - <math.h>

Beschreibung

Der Wert von C - BibliotheksfunktionenDoppel exp (double x) Gibt ehochx erhöht.

Erklärung

Hier ist exp () Erklärung der Funktion.

double exp(double x)

Parameter

  • x - Fließkommawert.

Rückgabewert

Diese Funktion liefert e hoch x erhöht.

Beispiele

Das folgende Beispiel zeigt die exp () Funktion verwendet wird.

#include <stdio.h>
#include <math.h>

int main ()
{
   double x = 0;
  
   printf("e 的 %lf 次幂是 %lf\n", x, exp(x));
   printf("e 的 %lf 次幂是 %lf\n", x+1, exp(x+1));
   printf("e 的 %lf 次幂是 %lf\n", x+2, exp(x+2));
   
   return(0);
}

Lassen Sie uns zusammenzustellen und um das obige Programm ausführen, die in der folgenden führen:

e 的 0.000000 次幂是 1.000000
e 的 1.000000 次幂是 2.718282
e 的 2.000000 次幂是 7.389056

C Standard-Bibliothek - <math.h> C Standard - Bibliothek - <math.h>