pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/pow

s://developer.mozilla.org/favicon.ico" />

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.pow()

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.pow()**함수는base^exponent처럼 baseexponent를 제곱한 값을 반환합니다.

시도해 보기

console.log(Math.pow(7, 3));
// Expected output: 343

console.log(Math.pow(4, 0.5));
// Expected output: 2

console.log(Math.pow(7, -2));
// Expected output: 0.02040816326530612
//                  (1/49)

console.log(Math.pow(-7, 0.5));
// Expected output: NaN

문법

js
Math.pow(base, exponent);

매개변수

base

밑 값.

exponent

을 제곱하기 위해 사용하는 지수.

반환 값

주어진 밑 값을 주어진 지수 값으로 거듭제곱한 숫자 값.

설명

**Math.pow()**함수는 baseexponent 곱, 즉 base^exponent를 반환합니다. baseexponent는 10진수입니다.

pow()Math의 정적 메서드이므로 Math객체를 생성하여 그 메서드로 사용하지 말고, 항상 Math.pow()로 사용하십시오. (Math에는 생성자가 없습니다). 만약 밑(base) 값이 음수이고 지수(exponent)가 정수가 아닌 경우 결과는 NaN입니다.

예제

Math.pow()사용하기

js
// 간단한 예
Math.pow(7, 2); // 49
Math.pow(7, 3); // 343
Math.pow(2, 10); // 1024
// 분수 지수
Math.pow(4, 0.5); // 2 (4의 제곱근)
Math.pow(8, 1 / 3); // 2 (8의 세제곱근)
Math.pow(2, 0.5); // 1.4142135623730951 (2의 제곱근)
Math.pow(2, 1 / 3); // 1.2599210498948732 (2의 세제곱근)
// 양의 지수
Math.pow(7, -2); // 0.02040816326530612 (1/49)
Math.pow(8, -1 / 3); // 0.5
// 양의 밑
Math.pow(-7, 2); // 49 (제곱의 결과값은 양수입니다.)
Math.pow(-7, 3); // -343 (세제곱은 음수가 될 수 있습니다.)
Math.pow(-7, 0.5); // NaN (음수는 실제 제곱근을 가지지 않습니다.)
// "짝수"와 "홀수" 근이 서로 가깝게 놓여 있고
// 부동소수점 정밀도의 한계로 인해,
// 밑이 음수이며 지수가 분수라면 언제나 NaN을 반환합니다.
Math.pow(-7, 1 / 3); // NaN

명세서

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

브라우저 호환성

같이 보기

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy