Java Math exp () yöntemi, Euler sayısını belirtilen değerin üssüne yükseltilmiş e sayısını döndürür.
Yani ,.Math.exp(4.0) = e4.0
exp()
Yöntemin sözdizimi şöyledir:
Math.exp(double a)
İşte exp()
statik bir yöntem. Bu nedenle, sınıf adını kullanarak yönteme erişiyoruz Math
.
exp () Parametreler
exp()
Yöntem, tek bir parametre alır.
- a - e yükseltilecek sayı
exp () Dönüş Değerleri
- döner e bir bağımsız değişken için a
Not : Burada e değeri 2.71828 olan Euler sayısıdır.
Örnek: Java Math.exp ()
class Main ( public static void main(String() args) ( // Math.exp() method double a = 4.0d; System.out.println(Math.exp(a)); // 54.598150033144236 // without using Math.exp() // value of Euler Number double euler = 2.71828d; System.out.println(Math.pow(euler, a)); // 54.5980031309658 ) )
Yukarıdaki örnekte, e 4.0'ın değerini hesaplamak için Math.pow () yöntemini kullandık . Burada bunu görebiliriz
Math.exp(4.0) = e4.0