Expand documentation for RealFloat. Part of #3898.
Expand documentation for RealFloat. Part of #3898.

Elaborated on the behaviour of decodeFloat, siginficand and exponent for the
edge cases, infinities, NaNs and -0.0, also clarified the sense in which
encodeFloat is the inverse of decodeFloat.

For exponent, the matter was simply incorrect documentation.
For decodeFloat/encodeFloat, there is the fundamental problem of
finding out what the right behaviour is. Currently, decodeFloat
treats infinities and NaNs as if they were finite values.
The only viable alternative seems to be raising an error,
but that could make some programmes unnecessarily fail, since
the current behaviour can be correct and harmless for infinities
(the behaviour on NaN however is bad). Also, testing for finiteness
would have performance implications.

For the time being, the docs say behaviour is unspecified on
infinities and NaNs.

shlevy/ghc,olsner/ghc,holzensp/ghc,jstolarek/ghc,frantisekfarka/ghc-dsi,oldmanmike/ghc,christiaanb/ghc,vikraman/ghc,mfine/ghc,mcschroeder/ghc,wxwxwwxxx/ghc,elieux/ghc,tjakway/ghcjvm,da-x/ghc,fmthoma/ghc,vTurbine/ghc,spacekitteh/smcghc,anton-dessiatov/ghc,da-x/ghc,ghc-android/ghc,nushio3/ghc,vTurbine/ghc,TomMD/ghc,mcschroeder/ghc,vTurbine/ghc,da-x/ghc,lukexi/ghc,siddhanathan/ghc,anton-dessiatov/ghc,ghc-android/ghc,elieux/ghc,urbanslug/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,shlevy/ghc,green-haskell/ghc,AlexanderPankiv/ghc,mfine/ghc,anton-dessiatov/ghc,shlevy/ghc,nushio3/ghc,siddhanathan/ghc,anton-dessiatov/ghc,nathyong/microghc-ghc,vikraman/ghc,mfine/ghc,GaloisInc/halvm-ghc,holzensp/ghc,snoyberg/ghc,da-x/ghc,mcschroeder/ghc,TomMD/ghc,frantisekfarka/ghc-dsi,nathyong/microghc-ghc,urbanslug/ghc,ml9951/ghc,vTurbine/ghc,gridaphobe/ghc,ryantm/ghc,elieux/ghc,fmthoma/ghc,ml9951/ghc,holzensp/ghc,mcschroeder/ghc,lukexi/ghc,mcschroeder/ghc,urbanslug/ghc,tibbe/ghc,lukexi/ghc,ryantm/ghc,fmthoma/ghc,acowley/ghc,oldmanmike/ghc,jstolarek/ghc,gridaphobe/ghc,siddhanathan/ghc,siddhanathan/ghc,mettekou/ghc,AlexanderPankiv/ghc,gcampax/ghc,ml9951/ghc,fmthoma/ghc,ml9951/ghc,nathyong/microghc-ghc,gridaphobe/ghc,nathyong/microghc-ghc,ml9951/ghc,GaloisInc/halvm-ghc,TomMD/ghc,snoyberg/ghc,vikraman/ghc,ghc-android/ghc,spacekitteh/smcghc,vTurbine/ghc,vikraman/ghc,sdiehl/ghc,siddhanathan/ghc,ezyang/ghc,bitemyapp/ghc,AlexanderPankiv/ghc,gcampax/ghc,ryantm/ghc,elieux/ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,lukexi/ghc,mettekou/ghc,wxwxwwxxx/ghc,green-haskell/ghc,fmthoma/ghc,olsner/ghc,spacekitteh/smcghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,TomMD/ghc,urbanslug/ghc,olsner/ghc,sdiehl/ghc,TomMD/ghc,bitemyapp/ghc,holzensp/ghc,nkaretnikov/ghc,ezyang/ghc,green-haskell/ghc,ezyang/ghc,christiaanb/ghc,gcampax/ghc,nkaretnikov/ghc,christiaanb/ghc,anton-dessiatov/ghc,gridaphobe/ghc,snoyberg/ghc,elieux/ghc,TomMD/ghc,AlexanderPankiv/ghc,green-haskell/ghc,gcampax/ghc,jstolarek/ghc,snoyberg/ghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,ghc-android/ghc,olsner/ghc,spacekitteh/smcghc,mcschroeder/ghc,mfine/ghc,mfine/ghc,mfine/ghc,olsner/ghc,sgillespie/ghc,mettekou/ghc,ml9951/ghc,bitemyapp/ghc,da-x/ghc,TomMD/ghc,gcampax/ghc,sdiehl/ghc,ghc-android/ghc,ezyang/ghc,jstolarek/ghc,gridaphobe/ghc,AlexanderPankiv/ghc,olsner/ghc,wxwxwwxxx/ghc,sdiehl/ghc,nkaretnikov/ghc,mettekou/ghc,vTurbine/ghc,ezyang/ghc,snoyberg/ghc,snoyberg/ghc,spacekitteh/smcghc,ml9951/ghc,bitemyapp/ghc,acowley/ghc,gridaphobe/ghc,sgillespie/ghc,mettekou/ghc,siddhanathan/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,ghc-android/ghc,tjakway/ghcjvm,wxwxwwxxx/ghc,snoyberg/ghc,sdiehl/ghc,nkaretnikov/ghc,gridaphobe/ghc,ryantm/ghc,tjakway/ghcjvm,mettekou/ghc,christiaanb/ghc,GaloisInc/halvm-ghc,shlevy/ghc,shlevy/ghc,ryantm/ghc,shlevy/ghc,siddhanathan/ghc,nushio3/ghc,tibbe/ghc,vTurbine/ghc,nathyong/microghc-ghc,acowley/ghc,lukexi/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,mfine/ghc,nushio3/ghc,forked-upstream-packages-for-ghcjs/ghc,AlexanderPankiv/ghc,tjakway/ghcjvm,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,forked-upstream-packages-for-ghcjs/ghc,da-x/ghc,oldmanmike/ghc,shlevy/ghc,da-x/ghc,sdiehl/ghc,vikraman/ghc,sgillespie/ghc,wxwxwwxxx/ghc,nkaretnikov/ghc,mettekou/ghc,nushio3/ghc,christiaanb/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,nkaretnikov/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,green-haskell/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,bitemyapp/ghc,tjakway/ghcjvm,frantisekfarka/ghc-dsi,acowley/ghc,acowley/ghc,nushio3/ghc,sgillespie/ghc,vikraman/ghc,acowley/ghc,tibbe/ghc,tjakway/ghcjvm,urbanslug/ghc,fmthoma/ghc,sdiehl/ghc,gcampax/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,sgillespie/ghc,anton-dessiatov/ghc,nushio3/ghc,ezyang/ghc,urbanslug/ghc,holzensp/ghc,anton-dessiatov/ghc,gcampax/ghc,oldmanmike/ghc,tibbe/ghc,acowley/ghc,sgillespie/ghc,tibbe/ghc,ghc-android/ghc,mcschroeder/ghc,ezyang/ghc,urbanslug/ghc,vikraman/ghc,ml9951/ghc,fmthoma/ghc,elieux/ghc,wxwxwwxxx/ghc,nathyong/microghc-ghc