6 ms·
I implemented the same in Haskell a while ago: https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs https://github.com/xyzzyz/FibBinet/blob/master/FibBin
by xyzzyz 11y ago
I implemented the same in Haskell a while ago: https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs
With yours, both make interesting comparison of how similar problem is solved in different languages.
- eru 11y agoWhy did you define both negate and (-)?
- xyzzyz 11y agoI don't know. I probably shouldn't have. I accept pull requests.
- panic 11y agoIn Haskell you can use Data.Real.Constructible (http://hackage.haskell.org/package/constructible http://hackage.haskell.org/package/constructible) to compute exactly with arbitrary square roots.