primes-utils 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94c48fe22428ca617d418fe9209ed6984376f164698020b992d06896804dcc77
4
- data.tar.gz: 2e4192d3531f0a0ba9c38a1daf173d747d39793b23190ff53fa9ad04445032bd
3
+ metadata.gz: f8fdf633c100891c528022b3d270ecd05f0bce92ee7f0f917ca4b7046f49cfd8
4
+ data.tar.gz: 2ac2b550c50584c530cbd2206f701d160e9ace9744eb43c759430b539ab95c12
5
5
  SHA512:
6
- metadata.gz: ee404d5d9945d2ba429cbc7586fdfdf3548bf4b3c09fc5930bc6416472d59761bb0aedff48d7adb1420894b270322c35183e63c495436e6186bd249ee355fd55
7
- data.tar.gz: d86a64bf62aef1011a62ea1d22a68184f43ee64a5ec8bf7fe68a9d3f32aaa53ef498ce2cbbc94557a1c6bc2b868e7f970ae361abd650fdaefd5294aaf1dda218
6
+ metadata.gz: 48a0a3fee6bf5a4f9a9c98c815bb886c4e4f802f8cd0cc85b85fb359c3c0d3b4b9dc59c44710bc4c5a87b3657b6ccd3fc81653547211e9dc2085fecec88acb5a
7
+ data.tar.gz: daf5d78637c602473f7471a9b71371473c107c049bf157063681267290306fb952a5ff0a76943a030f8b41a92441fb1b3dc5e01d6313821b536780e31be26aa2
data/README.md CHANGED
@@ -126,7 +126,6 @@ n=10**400; (n-500).primescntmr(n+500) => 1
126
126
  n=10**8; (25*n).primescnt => 121443371
127
127
  0.primescnt => 0
128
128
  1.primescntmr => 0
129
-
130
129
  ```
131
130
 
132
131
  **primenth(p=0) or nthprime(p=0)**
@@ -249,23 +248,16 @@ All the `primes-utils` methods are `instance_methods` for `Class Integer`.
249
248
  1.0.1 – check if using Ruby 1.8 at start, if so, require 'rational' library for gcd method
250
249
  1.0.0 – initial release April 1, 2015 with methods prime?, primemr?, primes, prime_division|factors, primenth|nthprime
251
250
  ```
252
-
253
251
  ## Author
254
252
  Jabari Zakiya
255
253
 
256
254
  ## References
257
- [1] https://www.scribd.com/doc/150217723/Improved-Primality-Testing-and-Factorization-in-Ruby-revised
258
-
259
- [2] https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ
260
-
261
- [3] https://www.scribd.com/doc/73385696/The-Sieve-of-Zakiya
262
-
263
- [4] https://en.wikipedia.org/wiki/GNU_Core_Utilities
264
-
265
- [5] https://en.wikipedia.org/wiki/Factor_(Unix)
266
-
267
- [6] https://en.wikipedia.org/wiki/Miller-Rabin_primality_test
268
-
255
+ [1] https://www.scribd.com/doc/150217723/Improved-Primality-Testing-and-Factorization-in-Ruby-revised
256
+ [2] https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ
257
+ [3] https://www.scribd.com/doc/73385696/The-Sieve-of-Zakiya
258
+ [4] https://en.wikipedia.org/wiki/GNU_Core_Utilities
259
+ [5] https://en.wikipedia.org/wiki/Factor_(Unix)
260
+ [6] https://en.wikipedia.org/wiki/Miller-Rabin_primality_test
269
261
  [7] https://www.academia.edu/105821370/Twin_Primes_Segmented_Sieve_of_Zakiya_SSoZ_Explained_Review_Article
270
262
 
271
263
  ## License
@@ -1,5 +1,5 @@
1
1
  module Primes
2
2
  module Utils
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.2"
4
4
  end
5
5
  end
data/lib/primes/utils.rb CHANGED
@@ -487,6 +487,7 @@ module Primes
487
487
  6_375_000_000 =>157_716_628_943, 6_500_000_000 => 160_940_840_461,
488
488
  6_625_000_000 =>164_167_763_329, 6_750_000_000 => 167_397_013_051,
489
489
  6_875_000_000 =>170_628_613_009, 7_000_000_000 => 173_862_636_221 }
490
+ end
490
491
 
491
492
  def select_pg(end_num, start_num) # adaptively select PG
492
493
  range = end_num - start_num
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.files = FileList['lib/primes/utils.rb', 'lib/primes/utils/*.rb','bin/*', 'README.md', 'Gemfile', 'Rakefile', 'CODE_OF_CONDUCT.md', 'primes-utils-3.0.0.gemspec']
18
18
  spec.require_paths = ["lib"]
19
19
  spec.license = "LGPL-2.0-or-later"
20
- spec.required_ruby_version = ">= 3.0.0"
20
+ spec.required_ruby_version = ">= 3.0.1"
21
21
 
22
22
  spec.add_dependency "bitarray", "~> 1.3", ">= 1.3.1"
23
23
  spec.add_development_dependency "bundler", "~> 1.9"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primes-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jabari Zakiya