aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/global_objects/number/epsilon/index.html
blob: 730fd8ae879a3e34a8a5e0d621e612a6895b0ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Number.EPSILON
slug: Web/JavaScript/Reference/Global_Objects/Number/EPSILON
tags:
  - ECMAScript6
  - JavaScript
  - Number
  - 속성
translation_of: Web/JavaScript/Reference/Global_Objects/Number/EPSILON
---
<div>{{JSRef}}</div>

<p> <strong><code>Number.EPSILON</code></strong> 속성(property)은 {{jsxref("Number")}} 형으로 표현될 수 있는 1과 1보다 큰 값 중에서 가장 작은 값의, 차입니다.</p>

<p>당신은 이 정적 속성에 접근하기 위하여 {{jsxref("Number")}} 객체를 생성할 필요가 없습니다. <code>Number.EPSILON</code>을 쓰면 됩니다.</p>

<div>{{js_property_attributes(0, 0, 0)}}</div>

<h2 id="설명">설명</h2>

<p>이 <code>EPSILON</code> 속성은 대략 <code>2.2204460492503130808472633361816E-16</code> 또는 <code>2<sup>-52</sup></code>의 값을 갖습니다.</p>

<h2 id="예제">예제</h2>

<h3 id="동일성_확인하기">동일성 확인하기</h3>

<pre class="brush: js">const x = 0.2, y = 0.3, z = 0.1;
let equal = (Math.abs(x - y + z) &lt; Number.EPSILON);
</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
   <th scope="col">상태</th>
   <th scope="col">비고</th>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-number.epsilon', 'Number.EPSILON')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td>최초로 정의됨.</td>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-number.epsilon', 'Number.EPSILON')}}</td>
   <td>{{Spec2('ESDraft')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<p>{{Compat("javascript.builtins.Number.EPSILON")}}</p>

<h2 id="관련된_문서">관련된 문서</h2>

<ul>
 <li>이 속성을 가지고 있는 {{jsxref("Number")}} 객체</li>
</ul>