
#14389: Improved results in GHCi during basic calculations -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- We can use GHCi as a calculator using {{{+}}}, {{{-}}}, {{{*}}}, {{{/}}}, {{{sin}}}, {{{cos}}}, and others. sometimes the result does not meet our expectations. for example if I calculate 3 + 2, the result is 5 and in line with our expectations. \\ {{{ Prelude> 3+2 5 }}} but sometimes it is not.\\ for the two examples below, please, can we have in GHCi a result other than the one given?\\ {{{ Prelude> exp(log(1000)-log(10)) 99.99999999999996 }}} can we have a result equal to {{{100}}}? \\ {{{ Prelude> 12*(1/3-1/4)-1 -2.220446049250313e-16 }}} can we have a result equal to {{{0}}}? \\ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14389 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler