Sha256: 9f4d145a123632dc2e4556f12134e8d2439e97d09f7a93778698c043fdb7a1e0
Contents?: true
Size: 704 Bytes
Versions: 6
Compression:
Stored size: 704 Bytes
Contents
# coding: utf-8 describe Integer, "#multiamicable?" do @seq = [ [1, 6, 76455288, 183102192], [1, 7, 52920, 152280], [1, 7, 16225560, 40580280], [1, 7, 90863136, 227249568], [1, 7, 16225560, 40580280], [1, 7, 70821324288, 177124806144], [1, 7, 199615613902848, 499240550375424], ].first(5) @seq.each do |a, b, m, n| it "returns true for multi-amicable numbers #{n} and #{m} (α = #{a}, β = #{b})" do n.should be_multiamicable(m, a, b) end end @seq.each do |a, b, m, n| a += 3 n -= 100 it "returns false for non-multi-amicable numbers #{n} and #{m} (α = #{a}, β = #{b})" do n.should_not be_multiamicable(m, a, b) end end end
Version data entries
6 entries across 6 versions & 1 rubygems