Numerical integration: Difference between revisions
m
→{{header|Haskell}}
m (→{{header|Haskell}}: (tidying string concatenations in the test)) |
|||
Line 2,348:
main =
mapM_
(\(s, e@(
putStrLn
(concat
[
, show [a, b]
, " ("
, show n
, " approximations)"
])
mapM_
(\(s, integration) ->
putStrLn (indent 20 (s ++ ":") ++ show (uncurry4 integration e)))
ms
putStrLn [])
integrations
where
{{Out}}
<pre>f(x) = x^3 [0.0,1.0] (100 approximations)
|