Skip to content

Commit aed2d74

Browse files
(FLT|L?DBL)_EPSILON に説明を追加
1 parent a0930bf commit aed2d74

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

reference/cfloat/dbl_epsilon.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
#DBL_EPSILON
22
* cfloat[meta header]
33
* macro[meta id-type]
4+
* [mathjax enable]
45

56
```cpp
67
#define DBL_EPSILON implementation-defined
78
```
89
* implementation-defined[italic]
910
1011
##概要
11-
`double` の機械イプシロンを表す。
12+
`double` における、$1$ と $1$ より大きい最小の数との差(機械イプシロン)を表すマクロ。
13+
以下の式で表される。
14+
15+
$$
16+
b^{1-p}
17+
$$
18+
19+
ここで、$b$ は指数表現の基数、$p$ は精度(基数 $b$ での仮数部の桁数)である。
20+
$b$ や $p$ については [`<cfloat>`](../cfloat.md) のモデルも参照。
1221
1322
`std::`[`numeric_limits`](/reference/limits/numeric_limits.md)`<double>::`[`epsilon`](/reference/limits/numeric_limits/epsilon.md)`()` と等しい。
23+
24+
##備考
25+
規格で `1E-9`($10^{-9}$)以下であることが規定されている。

reference/cfloat/flt_epsilon.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
#FLT_EPSILON
22
* cfloat[meta header]
33
* macro[meta id-type]
4+
* [mathjax enable]
45

56
```cpp
67
#define FLT_EPSILON implementation-defined
78
```
89
* implementation-defined[italic]
910
1011
##概要
11-
`float` の機械イプシロンを表す。
12+
`float` における、$1$ と $1$ より大きい最小の数との差(機械イプシロン)を表すマクロ。
13+
以下の式で表される。
14+
15+
$$
16+
b^{1-p}
17+
$$
18+
19+
ここで、$b$ は指数表現の基数、$p$ は精度(基数 $b$ での仮数部の桁数)である。
20+
$b$ や $p$ については [`<cfloat>`](../cfloat.md) のモデルも参照。
1221
1322
`std::`[`numeric_limits`](/reference/limits/numeric_limits.md)`<float>::`[`epsilon`](/reference/limits/numeric_limits/epsilon.md)`()` と等しい。
23+
24+
##備考
25+
規格で `1E-6`($10^{-6}$)以下であることが規定されている。

reference/cfloat/ldbl_epsilon.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
#LDBL_EPSILON
22
* cfloat[meta header]
33
* macro[meta id-type]
4+
* [mathjax enable]
45

56
```cpp
67
#define LDBL_EPSILON implementation-defined
78
```
89
* implementation-defined[italic]
910
1011
##概要
11-
`long double` の機械イプシロンを表す。
12+
`long double` における、$1$ と $1$ より大きい最小の数との差(機械イプシロン)を表すマクロ。
13+
以下の式で表される。
14+
15+
$$
16+
b^{1-p}
17+
$$
18+
19+
ここで、$b$ は指数表現の基数、$p$ は精度(基数 $b$ での仮数部の桁数)である。
20+
$b$ や $p$ については [`<cfloat>`](../cfloat.md) のモデルも参照。
1221
1322
`std::`[`numeric_limits`](/reference/limits/numeric_limits.md)`<long double>::`[`epsilon`](/reference/limits/numeric_limits/epsilon.md)`()` と等しい。
23+
24+
##備考
25+
規格で `1E-9`($10^{-9}$)以下であることが規定されている。

0 commit comments

Comments
 (0)