Numerical integration: Difference between revisions

Content added Content deleted
(→‎{{header|Haskell}}: Added section labels to output, pruned some redundancy in output code)
m (→‎{{header|Haskell}}: (Changed one name))
Line 2,335: Line 2,335:
]
]


integrations
expressions
:: (Fractional a, Num t, Num t1, Num t2)
:: (Fractional a, Num t, Num t1, Num t2)
=> [(String, (a -> a, t, t1, t2))]
=> [(String, (a -> a, t, t1, t2))]
integrations =
expressions =
[ ("x^3", ((^ 3), 0, 1, 100))
[ ("x^3", ((^ 3), 0, 1, 100))
, ("1/x", ((1 /), 1, 100, 1000))
, ("1/x", ((1 /), 1, 100, 1000))
Line 2,358: Line 2,358:
ms
ms
putStrLn [])
putStrLn [])
expressions
integrations
where
where
justifyLeft n c s = take n (s ++ replicate n c)</lang>
justifyLeft n c s = take n (s ++ replicate n c)</lang>