Skip to content

Instantly share code, notes, and snippets.

@jsoffer
Created August 22, 2009 09:07
Show Gist options
  • Save jsoffer/172712 to your computer and use it in GitHub Desktop.
Save jsoffer/172712 to your computer and use it in GitHub Desktop.
Gnuplot y punto fijo
-- número de pasos para aproximar -phi por punto fijo de x = 1/(x-1)
Prelude Graphics.Gnuplot.Simple> plotList [] $
map (\x -> let
nums = iterate (\k -> 1/(k-1)) x in
(\(a,b,c) -> c) $
head $
dropWhile (\(a,b,c) -> a /= b) $
zip3 (tail nums) nums [1..]) (map (/3000) [0..12000])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment