From b4dd59b1c20deab4381959d8cc8394ada113d286 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 6 Feb 2014 01:36:28 -0500 Subject: [PATCH] Fix some docs in Roots.Simple. --- src/Roots/Simple.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Roots/Simple.hs b/src/Roots/Simple.hs index a5924f4..815a64c 100644 --- a/src/Roots/Simple.hs +++ b/src/Roots/Simple.hs @@ -197,6 +197,7 @@ fixed_point_error_ratios f x0 x_star p = -- Examples: -- -- Atkinson, p. 60. +-- -- >>> let f x = x^6 - x - 1 -- >>> let f' x = 6*x^5 - 1 -- >>> tail $ take 4 $ newton_iterations f f' 2 @@ -283,6 +284,7 @@ iterate2 f x0 x1 = -- Examples: -- -- Atkinson, p. 67. +-- -- >>> let f x = x^6 - x - 1 -- >>> take 4 $ secant_iterations f 2 1 -- [2.0,1.0,1.0161290322580645,1.190577768676638] @@ -308,6 +310,7 @@ secant_iterations f = -- Examples: -- -- Atkinson, p. 67. +-- -- >>> let f x = x^6 - x - 1 -- >>> let Just root = secant_method f (1/10^9) 2 1 -- >>> root -- 2.43.2