[Haskell-cafe] Re: pi
David Roundy
droundy at darcs.net
Wed Oct 10 13:44:38 EDT 2007
On Wed, Oct 10, 2007 at 12:29:07PM +0200, jerzy.karczmarczuk at info.unicaen.fr wrote:
> ChrisK writes:
> >There are two things in Floating, the power function (**) [ and sqrt ]
> >and the transcendental functions (trig functions,exp and log, and
> >constant pi).
> >
> >Floating could be spit into two classes, one for the power and one for the
> >transcendental functions.
>
> The power is an abomination for a mathematician. With rational exponent it
> may generate algebraic numbers, with any real - transcendental... The
> splitting should be more aggressive. It would be good to have *integer*
> powers, whose existence is subsumed by the multiplicative s.group structure.
> But the Haskell standard insists that the exponent must belong to the same
> type as the base...
I suppose you're unfamiliar with the (^) operator, which does what you
describe?
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?
--
David Roundy
Department of Physics
Oregon State University
More information about the Haskell-Cafe
mailing list