David Roundy wrote:
On Wed, Oct 10, 2007 at 12:29:07PM +0200, [EMAIL PROTECTED] 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?

and (^^) which allows even negative integer exponents (at the price of requiring it to be possible to take the reciprocal of the base type)

Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to