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