• + 0 comments

    Can someone explain this weird behaviour around modulus in Haskell? I feel like I've got the 100th fibonacci number correctly, but can't get modulus to do what I want:

    Prelude> mod 354224848179261915075 10000007 1759647 Prelude> 10^8+7 100000007 Prelude> mod 354224848179261915075 10^8+7 390632 Prelude> 354224848179261915075 mod 10^8+7 61915082