answersLogoWhite

0


Best Answer

public double getExp(double x)

{

return Math.pow(Math.E, x);

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program of e power x in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write a pseudocode program for finding out x to the power of y?

X**y


Write a java application that generates two random numbers using built in method math random ranging 5 to 8 the program should use another built in method to calculate the power of xy the x value is t?

write a java application that generate custemer account balance in a banking system?


What is an exception With an example program explain how it is handled?

An exception is literally that: an exception. Exceptions are thrown when something that shouldn't happen does. For example, if you're trying to turn "Hi" into an Integer, you'll get a NumberFormatException (in Java.) If there is nothing in place to handle an exception, the program will crash. Try-catch blocks are used for exception handling within methods, and exception throwing is used to give out exceptions, or let a different method handle it. Example program (Java): class ex{ public static void main(String[] args){ String Strx = "5a"; int x = 0; try{ x += Integer.parseInt(Strx); }catch(NumberFormatException e){ // If Strx is not an Integer x += Integer.parseInt("5"); } System.out.println("The value of x is " + x); // The value of x is 5 } } Alternatively, you could remove the try-catch blocks, and simply write "public static void main(String[] args) throws NumberFormatException" in the 2nd line of the program.


1 Write a Java program to find x to the power y Use overloading for different cases when x and y are combination of integer and floating point numbers?

In practice, it is better to use the Math class, which already has a pow() (i.e., power) function. If you want to program it yourself, just write a loop:double myPower(double x, int y){double result = 1;for (int i = 1; i


What does exclamation equals mean in java?

The exclamation equals in Java(x!=) is used to represent the logical NOT.

Related questions

Integral of e to the power of -x?

integral of e to the power -x is -e to the power -x


What is the first derivative of e raised to the power of x?

The first derivative of e to the x power is e to the power of x.


What is the value of e to the power of (2x) when e to the power of x equals 2?

The power law of indices says: (x^a)^b = x^(ab) = x^(ba) = (x^b)^a → e^(2x) = (e^x)² but e^x = 2 → e^(2x) = (e^x)² = 2² = 4


How do you integrate x power x?

e^x/1-e^x


What is the derivative of e power negative x?

d/dx (e-x) = -e-x


What is the second derivative of xsqaured e to the power of x?

f(x) = (x^2)(e^x)f'(x) = e^x((x^2)+2x) - i thinkf"(x) = ?--------f(x) = (x^2)(e^x)apply the power rulef'(x) = (x^2)(e^x) + (2x)(e^x)apply the power rule to the first part and apply the power rule to the second part, then add those togetherf''(x) = [(x^2)(e^x) + (2x)(e^x)] + [(2x)(e^x) + (2)(e^x)]simplifyf''(x) = (e^x)(x^2 + 4x +2)I got it right. It checked out on my calculator.


What is e to the power of 3 ln x?

e^(3lnx)=e^[ln(x^3)]=x^3


Volt current x power?

No, its Volts x current = power. To be correct its W = I x E where watts = power, I = amps or current and E = electromotive force or voltage.


Why don't you have Java on a Mac?

Mac OS X has Java already installed. You do not need to download it and install it currently, and Java apps should have no problem running. It has to be a real java app, not a Windows exe file compiled that also uses java, that is still a Windows program. When Mac OS X 10.7 comes out, it will not have Java installed by default, and you have to install it manually just like you do on Windows.... just download the Mac version and install.


What is an integral of ex logx?

if you mean e to the x power times log of x, it is e to the x divided by x


How do you write a pseudocode program for finding out x to the power of y?

X**y


What is the derivative of e to the power of -2 times x?

e^(-2x) * -2 The derivative of e^F(x) is e^F(x) times the derivative of F(x)