[Haskell-cafe] The maths behind the Fastest Fibb In The West.
michael at schmong.org
Fri May 6 23:46:20 UTC 2016
I've been working on a project that needs a good fibonacci generator, and
I'm to the point where can now improve upon this one:
thanks to this guy:
He suggested breaking up a guard into two diffeent functions, which I can
do, but I don't know what to call them because I don't know why the
operations are different. I'm referring to this section:
fib' (f, g) p
| p = (f*(f+2*g), f^2 + g^2)
| otherwise = (f^2+g^2, g*(2*f-g))
I'd like to know the reason why each guard does two entirely different
things, so I know what to call the functions when I seperate them out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe