Guest User

Untitled

a guest
May 8th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.26 KB | None | 0 0
  1. proc fcnF(n : int) : tuple[a, b :int] =
  2.   if n == 0: (1,2)
  3.   else:
  4.     let x = fcnF(n-1)
  5.     (x.b, 6 * x.a * x.b div (5 * x.a - x.b))
  6.  
  7. echo fcnF(30) # ok (a: 1073741824, b: 2147483648)
  8. echo fcnF(31) # Error: unhandled exception: over- or underflow [OverflowError]
Add Comment
Please, Sign In to add comment