X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FIntegration%2FSimpson.hs;h=6bfe258eb8e454b7a9dcc0c7221d4638eed3f61f;hb=cc93d648089344338030a9b79cd7bea7c6e8c997;hp=c9ad414b4fa7cc85705af2604d2295524ceeb01e;hpb=e21dd0f819e165daceec53c205dd0ab622fceee2;p=numerical-analysis.git diff --git a/src/Integration/Simpson.hs b/src/Integration/Simpson.hs index c9ad414..6bfe258 100644 --- a/src/Integration/Simpson.hs +++ b/src/Integration/Simpson.hs @@ -45,7 +45,7 @@ simpson_1 :: (RealField.C a, ToRational.C a, RealField.C b) simpson_1 f a b = coefficient * ((f a) + 4*(f midpoint) + (f b)) where - coefficient = (fromRational' $ toRational (b - a)) / 6 + coefficient = fromRational' $ (toRational (b - a)) / 6 midpoint = (a + b) / 2