Sha256: 4b7a95fe50673c2024ca95335f7cf26647c210789e9b7328ce04853f1a57ad3e
Contents?: true
Size: 381 Bytes
Versions: 2
Compression:
Stored size: 381 Bytes
Contents
require 'prime' describe "Integer.from_prime_division" do it "returns the product of the given factorization" do Integer.from_prime_division([[2,3], [3,3], [5,3], [7,3], [11,3], [13,3], [17,3]]). should == 2**3 * 3**3 * 5**3 * 7**3 * 11**3 * 13**3 * 17**3 end it "returns 1 for an empty factorization" do Integer.from_prime_division([]).should == 1 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubysl-prime-2.0.1 | spec/integer/from_prime_division_spec.rb |
rubysl-prime-2.0.0 | spec/integer/from_prime_division_spec.rb |