
Math.pow() 함수의 exponent가 음수일 때, 결과는 다음과 같이 계산됩니다.
- Math.pow(base, -exponent) = 1 / Math.pow(base, exponent)
예를 들어, Math.pow(2, -3)의 결과는 다음과 같이 계산됩니다.
- Math.pow(2, -3) = 1 / Math.pow(2, 3)
- Math.pow(2, -3) = 1 / (2 * 2 * 2)
- Math.pow(2, -3) = 1 / 8
- Math.pow(2, -3) = 0.125
따라서, Math.pow(2, -3)의 결과는 0.125입니다.
2025-03-19 08:27