The Math.LN2 property represents the natural logarithm of 2, approximately 0.693:

Math.LN2 속성은 2의 자연로그 값, 약 0.693의 값을 가집니다.

Math.LN2=ln(2)0.693\mathtt{\mi{Math.LN2}} = \ln(2) \approx 0.693

Property attributes of Math.LN2
Writable no
Enumerable no
Configurable no

설명

LN2Math의 정적 속성이므로, 사용자가 생성한 Math 객체의 속성으로 접근할 수 없고 항상 Math.LN2를 사용해야 합니다. (Math는 생성자가 아닙니다)

Examples

Math.LN2 사용하기

다음 함수는 2의 자연 로그 값을 반환합니다.

function getNatLog2() {
  return Math.LN2;
}

getNatLog2(); // 0.6931471805599453

명세

Specification Status Comment
ECMAScript 1st Edition (ECMA-262) Standard Initial definition. Implemented in JavaScript 1.0.
ECMAScript 5.1 (ECMA-262)
The definition of 'Math.LN2' in that specification.
Standard  
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Math.LN2' in that specification.
Standard  
ECMAScript Latest Draft (ECMA-262)
The definition of 'Math.LN2' in that specification.
Draft  

브라우저 호환성

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
Basic supportChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yesnodejs Full support Yes

Legend

Full support  
Full support

같이 보기

문서 태그 및 공헌자

이 페이지의 공헌자: urty5656
최종 변경자: urty5656,