| 23 | | [in GHCi]: |
| 24 | | Prelude> realToFrac (0/0 :: Float) :: Double |
| | 23 | [in GHCi-6.6 on PowerPC, OS X]: |
| | 24 | {{{ |
| | 25 | Prelude> 0.0/0.0 |
| | 26 | NaN |
| | 27 | |
| | 28 | Prelude> realToFrac (0.0/0.0) :: Double |
| | 29 | Infinity |
| | 30 | |
| | 31 | Prelude> realToFrac (0.0/0.0 :: Float) |
| | 32 | 5.104235503814077e38 |
| | 33 | |
| | 34 | Prelude> realToFrac (0.0/0.0 :: Float) :: Double |
| | 35 | 5.104235503814077e38 |
| | 36 | |
| | 37 | Prelude> realToFrac (1.0/0.0) |
| | 38 | Infinity |
| | 39 | Prelude> realToFrac (1.0/0.0 :: Float) |
| | 40 | 3.402823669209385e38 |
| | 41 | |
| | 42 | }}} |
| | 43 | |
| | 44 | This bug is not due to the lack of FPU exceptions in Cmm but bears mention as the internal conversion performed in 'realToFrac' on 'Float's and might benefit from FPU exceptions. |