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 July 2015.

**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® 2025 Language Specification
# sec-math.exp

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
exp

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

같이 보기