This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

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오일러 상수(또는 네이피어 상수)는 자연 로그의 밑입니다.

시도해 보기

console.log(Math.exp(0));
// Expected output: 1

console.log(Math.exp(1));
// Expected output: 2.718281828459 (approximately)

console.log(Math.exp(-1));
// Expected output: 0.36787944117144233

console.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.36787944117144233
Math.exp(0); // 1
Math.exp(1); // 2.718281828459045

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-math.exp

브라우저 호환성

같이 보기