[Haskell-cafe] Re: pi

David Roundy droundy at darcs.net
Wed Oct 10 15:46:33 EDT 2007

On Wed, Oct 10, 2007 at 08:53:22PM +0200, Henning Thielemann wrote:
> On Wed, 10 Oct 2007, David Roundy wrote:
> >It seems that you're arguing that (**) is placed in the correct class,
> >since it's with the transcendental functions, and is implemented in terms
> >of those transcendental functions.  Where is the abomination here?
> (**) should not exist, because there is no sensible definition for many 
> operands for real numbers, and it becomes even worse for complex numbers. 
> The more general the exponent, the more restricted is the basis and vice 
> versa in order to get sound definitions.

Would you also prefer to eliminate sqrt and log? We've been using these
functions for years (in other languages) without difficulty, and I don't
see why this has changed.  I think it's quite sensible, for instance, that
passing a negative number as the first argument of (**) with the second
argument non-integer leads to a NaN.
David Roundy
Department of Physics
Oregon State University

More information about the Haskell-Cafe mailing list