[GHC] #1042: Floating point exception

GHC trac at galois.com
Mon Jan 8 19:22:30 EST 2007


#1042: Floating point exception
----------------------+-----------------------------------------------------
 Reporter:  dons      |          Owner:         
     Type:  bug       |         Status:  new    
 Priority:  normal    |      Milestone:  6.6.1  
Component:  Compiler  |        Version:  6.6    
 Severity:  normal    |     Resolution:         
 Keywords:            |     Difficulty:  Unknown
 Testcase:            |   Architecture:  x86    
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Comment (by igloo):

 minBound seems to be a better answer than 0 to me, but I would prefer an
 exception to both of them. That way div would always either succeed or
 raise an exception (div by zero or overflow).

 Also, unlike addition overflow (say), we need to check for this happening
 anyway, so there is no performance advantage to just letting it wrap by
 itself.

 Finally, I would expect that programmers realise that addition,
 multiplication etc might wrap, but I suspect none have considered that
 division might.


 Thanks
 Ian

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1042>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list