From a7f7b2322f8104a8bb4f4a747943e7175eb41023 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Tue, 24 Nov 2015 21:29:28 +0000 Subject: [PATCH] Fix haddocks --- src/Data/CReal/Converge.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/CReal/Converge.hs b/src/Data/CReal/Converge.hs index c232fd8..903864c 100644 --- a/src/Data/CReal/Converge.hs +++ b/src/Data/CReal/Converge.hs @@ -58,6 +58,7 @@ class Converge a where -- For example trying to find the root of the following funciton @f@ with a -- poor choice of starting point. Although this doesn't find the root, it -- doesn't fail to terminate. + -- -- >>> let f x = x ^ 3 - 2 * x + 2 -- >>> let f' x = 3 * x ^ 2 - 2 -- >>> let initialGuess = 0.1 :: Float @@ -93,6 +94,7 @@ instance {-# OVERLAPPABLE #-} Eq a => Converge [a] where -- which the error function should be evaluated at. -- -- Find where log x = π using Newton's method +-- -- >>> let initialGuess = 1 -- >>> let improve x = x - x * (log x - pi) -- >>> let Just y = converge (iterate improve initialGuess)