Am 13.06.2004 um 12:44 schrieb Glynn Clements:


Using ^, term can be simplified to:

        term :: Double -> Integer -> Double
        term x n = (-1.0)^n * x^(2*n + 1) / fromInteger (fac (2*n + 1))

(Further interesting information snipped...)

Ok, I just didn't know this operator. This is actually exactly what I was hoping to be able to write.

Thanks,
Chris

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to