die Ergebniswerte stimmen noch nicht - kann mir einer helfen?
Java:
public class Expo_e {
public static double eT(double x, int n)
{
double y = 0.0;
for (int i = 0; i <= n; i++)
{
y += (Math.pow(x, (double)i))/(double)f(i) ;
}
return y;
}
public static double f(int n) {
return n < 2 ? 1 : n*f(n-1);
}
}