回答編集履歴
1
説明追加
test
CHANGED
@@ -3,3 +3,37 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
x->-∞ のとき、exp(x)はゼロに収束します。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
```python
|
10
|
+
|
11
|
+
>>> np.exp(-7.44e2)
|
12
|
+
|
13
|
+
1e-323
|
14
|
+
|
15
|
+
>>> np.exp(-7.45e2)
|
16
|
+
|
17
|
+
0.0
|
18
|
+
|
19
|
+
```
|
20
|
+
|
21
|
+
このあたりで浮動小数で表せる限界を超えます。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
これを回避するには、128ビットの浮動小数を使うしかないのですが、私の使っているシステムではまだ使えないようです。
|
26
|
+
|
27
|
+
```python
|
28
|
+
|
29
|
+
>>> np.float128
|
30
|
+
|
31
|
+
Traceback (most recent call last):
|
32
|
+
|
33
|
+
__getattr__
|
34
|
+
|
35
|
+
raise AttributeError("module {!r} has no attribute "
|
36
|
+
|
37
|
+
AttributeError: module 'numpy' has no attribute 'float128'
|
38
|
+
|
39
|
+
```
|