Actions
Bug #11606
closedPrime.prime? should throw error on invalid inputs
Description
irb(main):003:0> Prime.prime?(1,3)
=> false
irb(main):004:0> Prime.prime?(1.3)
=> false
irb(main):005:0> Prime.prime?(20.3)
=> true
Prime.prime? converts floating point numbers to integer to determine if they are prime. A prime by definition is a integer > 1. Will include a patch for this.
Actions
Like0
Like0Like0