d2ba75de75e1c1c3c738cefe8c6ac937f57765a7
6 self.map
{|d
| d
.to_s
}.join
.to_i
10 Rational(self[0].to_i
, self[1].to_i
)
14 (0...self.length
).map
{|r
| self.rotate(r
)}
19 @
@primes = Primes
.instance
22 @
@primes.include? self
26 @
@primes.primes
.length
30 self.to_digits
.all_rotations
.map
{|n
| n
.to_i
}.all
? {|n
| n
.prime
?} if self.prime
?
34 self.to_s
.split('').map
{|d
| d
.to_i
}
45 beginning_time
= Time
.now
46 cps
= (2..10**6).select
{|n
| n
.circular_prime
?}
49 puts
"Time elapsed #{(end_time - beginning_time)} seconds, going from #{pl0} to #{pl1} primes cached"
52 result
= RubyProf
.stop
54 printer
= RubyProf
::MultiPrinter.new(result
)
55 printer
.print(:path => ".", :profile => "profile")