| > Similarly, the greatest finite double value can be written as
| > 0x1.fffffffffffffp+1023.
| >
| > These constants have the form
| >
| > 0x[HH][.HHHHH]p[+/-]DDD
|
| If you don't want to wait on an (uncertain) inclusion into the Haskell
| standard, you can implement a small helper function to that effect
| yourself; essentially using encodeFloat .
Or, alternatively, use quasiquoting
[hex| 1.fffffp+1023 |]
where 'hex' is a Haskell function that parses the string.
http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html#th-quasiquotation
This has the advantage that you can use the constant in patterns too.
(In GHC 6.12 you have to say [$hex| 1.ffffp+1023 |], with a "$", but we're
changing that for 6.14. There's a thread on ghc-users about it.)
Simon
_______________________________________________
Haskell-prime mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-prime