Number.EPSILON

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.

Number.EPSILON 속성(property)은 Number 형으로 표현될 수 있는 1과 1보다 큰 값 중에서 가장 작은 값의, 차입니다.

당신은 이 정적 속성에 접근하기 위하여 Number 객체를 생성할 필요가 없습니다. Number.EPSILON을 쓰면 됩니다.

Property attributes of Number.EPSILON
쓰기 가능불가능
열거 가능불가능
설정 가능불가능

설명

EPSILON 속성은 대략 2.2204460492503130808472633361816E-16 또는 2^-52의 값을 갖습니다.

예제

동일성 확인하기

js
const x = 0.2,
  y = 0.3,
  z = 0.1;
let equal = Math.abs(x - y + z) < Number.EPSILON;

명세

Specification
ECMAScript® 2025 Language Specification
# sec-number.epsilon

브라우저 호환성

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
EPSILON

Legend

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

Full support
Full support

관련된 문서

  • 이 속성을 가지고 있는 Number 객체