Re: 2^(-1)

1998-04-10 Thread Jerzy Karczmarczuk
Lennart about the power operator (I don't remember who posed the question...): > Maybe you > should use (^^) instead, it is defined the way you suggest. > Or perhaps (**) which works on almost any number type. > > Maybe you should have a loo

Re: 2^(-1)

1998-04-09 Thread Lennart Augustsson
> Why is the class heirarchy set up such that 2^(-1) gives and error in > hugs and ghc? It has nothing to do with ghc or Hugs, it's the way Haskell is defined. If (^) was defined the way you suggest then it would be impossible to raise a number from the Integral class to an exponent

2^(-1)

1998-04-08 Thread Jeff P. Burdges (Weasel)
Why is the class heirarchy set up such that 2^(-1) gives and error in hugs and ghc? I don't know if there is some deep issue that requires there to be some exponential function with this property but this seems like a pretty serious bug. The obvios solution: expon x y = if y<0 then