Logo

Programming-Idioms

History of Idiom 86 > diff from v12 to v13

Edit summary for version 13 by :
New Ruby implementation by user [steenslag]

Version 12

2016-02-25, 21:05:44

Version 13

2016-04-06, 20:29:15

Idiom #86 Check if integer multiplication will overflow

Write boolean function multiplyWillOverflow which takes two integers x, y and return true if (x*y) overflows.

Idiom #86 Check if integer multiplication will overflow

Write boolean function multiplyWillOverflow which takes two integers x, y and return true if (x*y) overflows.

Code
def multiplyWillOverflow(a,b)
  false
end