Find exponential value of a number using Math.exp
- /*
- Find exponential value of a number using Math.exp
- This java example shows how to find an exponential value of a number
- using exp method of Java Math class.
- */
- public class FindExponentialNumberExample {
- public static void main(String[] args) {
- /*
- * To find exponential value of a number, use
- * static double exp(double d) method of Java Math class.
- *
- * It returns e raised to argument value.
- */
- System.out.println("Exponential of 2 is : " + Math.exp(2));
- }
- }
- /*
- Output would be
- Exponential of 2 is : 7.38905609893065
- */



