This page was translated from English by the community.Learn more and join the MDN Web Docs community.
Math.exp()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
**Math.exp()**함수는x를 인수로 하는e^x 값을 반환합니다. 그리고e는오일러 상수(또는 네이피어 상수)는 자연 로그의 밑입니다.
In this article
시도해 보기
console.log(Math.exp(0));// Expected output: 1console.log(Math.exp(1));// Expected output: 2.718281828459 (approximately)console.log(Math.exp(-1));// Expected output: 0.36787944117144233console.log(Math.exp(2));// Expected output: 7.38905609893065구문
js
Math.exp(x);매개변수
x숫자
반환 값
e는오일러 상수이고x는 인수인e^x값
Description
exp()는Math의 정적 메소드이기 때문에 새로 작성한Math 오브젝트 대신에 항상Math.exp()의 형태로 써야 합니다. (Math는 생성자가 아닙니다.)
예시
>Math.exp() 사용 예
js
Math.exp(-1); // 0.36787944117144233Math.exp(0); // 1Math.exp(1); // 2.718281828459045명세서
| Specification |
|---|
| ECMAScript® 2026 Language Specification> # sec-math.exp> |