X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FIntegration%2FSimpson.hs;h=2481f850b3bf6e15d7c7fac25c9c65de7d8b6be1;hb=c3905924154d9a8d56bdc57e2f36fe48b8524eef;hp=b7000224764e92095398837dedf3d56eaf4ee96c;hpb=e09978f7c891cf2d752f841ad6b90a0b51c9da9d;p=numerical-analysis.git diff --git a/src/Integration/Simpson.hs b/src/Integration/Simpson.hs index b700022..2481f85 100644 --- a/src/Integration/Simpson.hs +++ b/src/Integration/Simpson.hs @@ -38,7 +38,7 @@ simpson_1 :: (RealFrac a, Fractional b, Num b) simpson_1 f a b = coefficient * ((f a) + 4*(f midpoint) + (f b)) where - coefficient = (fromRational $ toRational (b - a)) / 6 + coefficient = (realToFrac (b - a)) / 6 midpoint = (a + b) / 2