more_math 1.6.0 → 1.8.0

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: 347b633c7b95cb4728828e2dcad06f04f824e340d72dc4192b0d81b7e3a2df6e
4
- data.tar.gz: 5e1bd55c18723aa18ccab2b7c916811ba8c84f2fb251bcaeb323575da045f7d3
3
+ metadata.gz: bcc2d84dad36dba3b74a49a1de06431135c220cb4b027251c30fb828a8078bb0
4
+ data.tar.gz: 075dcb1e3dbdd99870de43f04ae5d5481c8e02fa712fd70dab95c214e0d39da7
5
5
  SHA512:
6
- metadata.gz: 41d4ce4dff93f65ef91cd5b414f205b8a64567d148586d2dd7d09f0327aafc802fb655ccdbe6e44da29241cb86f863ffa38104b0d13aa3cc34b2061049db18fe
7
- data.tar.gz: bbd8bcfcb4fb17b3ad5ada2e069e1d969429de1f39c2d21305a4e8d7e56dbe3f96ec3d00411428711f82aa89293c2d15d5c028947250bc7f1670408971b1494d
6
+ metadata.gz: 5a354f264cca954a2f5bb1633131117c533e02375b55281c5a070e60ab64439d9e6a50cf8a6b654004f5d0d565e2cd6179927b6987a8beb118093a70c66a4ee2
7
+ data.tar.gz: 00ed6ef336035013ac18608cdcc1b52c4eb11947cc71f9d9bd5dce1c330be91d3669efb4b613930c0d9b74e227c02eef7d0aa501663c883b1f215bfecad6d00d
data/CHANGES.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-01-15 v1.8.0
4
+
5
+ - Added tests for `entropy_ratio` and `lambert_w` method inclusion/extension
6
+ - Extended `MoreMath::Functions` module with `Entropy` and `Lambert` modules
7
+ using `extend` instead of `include`
8
+ - Updated test execution command to use `bundle exec`
9
+ - Updated gem dependencies and version requirements:
10
+ - Updated `rubygems` version requirement from **4.0.2** to **4.0.3**
11
+ - Changed `gem_hadar` development dependency from version constraint "~>
12
+ 2.10" to ">= 2.17.0"
13
+ - Maintained compatibility with Ruby **2.0** and later versions
14
+ - Added changelog configuration to Rakefile with `filename` set to `CHANGES.md`
15
+ - Updated Ruby version from 4.0-rc-alpine to 4.0-alpine
16
+
17
+ ## 2025-12-19 v1.7.0
18
+
19
+ - Updated `bundle update` command to `bundle update --all` in `.all_images.yml`
20
+ - Added `ruby:4.0-rc-alpine` image configuration to `.all_images.yml`
21
+ - Added `lib/more_math/lambert.rb` to `s.extra_rdoc_files` and `s.files` in
22
+ `more_math.gemspec`
23
+ - Added `tests/lambert_test.rb` to `s.test_files` in `more_math.gemspec`
24
+ - Updated `s.rubygems_version` from **3.6.9** to **4.0.2** in
25
+ `more_math.gemspec`
26
+ - Updated `s.add_development_dependency` for `gem_hadar` from "~> 2.7" to "~>
27
+ 2.10" in `more_math.gemspec`
28
+ - Added `openssl-dev` to the list of packages installed by `apk add` in
29
+ `.all_images.yml`
30
+ - Rely on `test_helper` requiring `more_math`
31
+ - Added `MoreMath::Lambert` module with `lambert_w` method for principal branch
32
+ - Integrated `MoreMath::Lambert` into `MoreMath::Functions` module
33
+ - Included comprehensive test suite in `TestLambertW` class
34
+ - Added YARD documentation with examples and parameter descriptions
35
+ - Required `more_math/lambert` in `more_math/functions.rb`
36
+ - Supported special cases: W(0)=0, W(∞)=∞, W(-1/e)=-1
37
+ - Verified solution property: W(y)·e^(W(y)) = y
38
+ - Handled domain error for y < -1/e with NaN return
39
+ - Used `MoreMath::NewtonBisection` for robust numerical root finding
40
+ - Tests cover values: 0, 1, 100, 0.1, 1000 with expected results
41
+ - Tested convergence verification and edge cases
42
+
3
43
  ## 2025-09-30 v1.6.0
4
44
 
5
45
  - Replaced detailed feature sections in README with a concise bullet list of
data/Rakefile CHANGED
@@ -18,6 +18,10 @@ GemHadar do
18
18
  package_ignore '.all_images.yml', '.gitignore', 'VERSION', '.utilsrc',
19
19
  '.github', '.contexts', '.contexts'
20
20
 
21
+ changelog do
22
+ filename 'CHANGES.md'
23
+ end
24
+
21
25
  github_workflows(
22
26
  'static.yml' => { }
23
27
  )
@@ -1,4 +1,5 @@
1
1
  require 'more_math/entropy'
2
+ require 'more_math/lambert'
2
3
 
3
4
  module MoreMath
4
5
  # Provides mathematical functions and special functions for scientific computing.
@@ -343,7 +344,9 @@ module MoreMath
343
344
  NumberifyStringFunction.stringify_number(number, alphabet)
344
345
  end
345
346
 
346
- # Includes entropy calculations functionality
347
347
  include Entropy
348
+ extend Entropy
349
+ include Lambert
350
+ extend Lambert
348
351
  end
349
352
  end
@@ -0,0 +1,44 @@
1
+ module MoreMath
2
+ # Provides the Lambert W function implementation for solving equations of the
3
+ # form x * e^x = y
4
+ #
5
+ # The Lambert W function is a special function that solves the implicit
6
+ # equation x * e^x = y for x in terms of y. It has applications in various
7
+ # fields including combinatorics, physics, and engineering problems involving
8
+ # exponential growth and decay.
9
+ module Lambert
10
+ # Calculates the principal branch of the Lambert W function (W₀).
11
+ #
12
+ # The Lambert W function solves the equation: x * e^x = y
13
+ #
14
+ # @param y [Numeric] The input value for which to calculate W(y)
15
+ # @param epsilon [Float] Convergence threshold for the root finding algorithm
16
+ # @return [Float] The principal branch of the Lambert W function W(y)
17
+ # @raise [Math::DomainError] When y < -1/e (function is undefined for real numbers)
18
+ #
19
+ # @example Calculate W(1)
20
+ # MoreMath::Lambert.lambert_w(1) # => 0.5671432904097838
21
+ #
22
+ # @example Calculate W(0)
23
+ # MoreMath::Lambert.lambert_w(0) # => 0.0
24
+ #
25
+ # @example Calculate W(-1/e)
26
+ # MoreMath::Lambert.lambert_w(-1.0 / Math::E) # => -1.0
27
+ #
28
+ # @example Calculate W(100)
29
+ # MoreMath::Lambert.lambert_w(100) # => 3.432480170522278
30
+ def lambert_w(y, epsilon = 1E-16)
31
+ # Handle special cases
32
+ return 0.0 if y.zero?
33
+ return Float::INFINITY if y.infinite?
34
+ return -1.0 if (y - -1.0 / Math::E).abs < epsilon
35
+ return 0 / 0.0 if y <= -1.0 / Math::E
36
+
37
+ # Define the function f(x) = x * e^x - y
38
+ func = ->(x) { x * Math.exp(x) - y }
39
+
40
+ solver = MoreMath::NewtonBisection.new(&func)
41
+ solver.solve(nil, 1 << 16, epsilon)
42
+ end
43
+ end
44
+ end
@@ -1,6 +1,6 @@
1
1
  module MoreMath
2
2
  # MoreMath version
3
- VERSION = '1.6.0'
3
+ VERSION = '1.8.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/more_math.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: more_math 1.6.0 ruby lib
2
+ # stub: more_math 1.8.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "more_math".freeze
6
- s.version = "1.6.0".freeze
6
+ s.version = "1.8.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
@@ -11,19 +11,19 @@ Gem::Specification.new do |s|
11
11
  s.date = "1980-01-02"
12
12
  s.description = "Library that provides more mathematical functions/algorithms than standard Ruby.".freeze
13
13
  s.email = "flori@ping.de".freeze
14
- s.extra_rdoc_files = ["README.md".freeze, "lib/more_math.rb".freeze, "lib/more_math/cantor_pairing_function.rb".freeze, "lib/more_math/constants/functions_constants.rb".freeze, "lib/more_math/continued_fraction.rb".freeze, "lib/more_math/distributions.rb".freeze, "lib/more_math/entropy.rb".freeze, "lib/more_math/exceptions.rb".freeze, "lib/more_math/functions.rb".freeze, "lib/more_math/histogram.rb".freeze, "lib/more_math/linear_regression.rb".freeze, "lib/more_math/newton_bisection.rb".freeze, "lib/more_math/numberify_string_function.rb".freeze, "lib/more_math/permutation.rb".freeze, "lib/more_math/ranking_common.rb".freeze, "lib/more_math/sequence.rb".freeze, "lib/more_math/sequence/moving_average.rb".freeze, "lib/more_math/sequence/refinement.rb".freeze, "lib/more_math/string_numeral.rb".freeze, "lib/more_math/subset.rb".freeze, "lib/more_math/version.rb".freeze]
15
- s.files = ["CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "lib/more_math.rb".freeze, "lib/more_math/cantor_pairing_function.rb".freeze, "lib/more_math/constants/functions_constants.rb".freeze, "lib/more_math/continued_fraction.rb".freeze, "lib/more_math/distributions.rb".freeze, "lib/more_math/entropy.rb".freeze, "lib/more_math/exceptions.rb".freeze, "lib/more_math/functions.rb".freeze, "lib/more_math/histogram.rb".freeze, "lib/more_math/linear_regression.rb".freeze, "lib/more_math/newton_bisection.rb".freeze, "lib/more_math/numberify_string_function.rb".freeze, "lib/more_math/permutation.rb".freeze, "lib/more_math/ranking_common.rb".freeze, "lib/more_math/sequence.rb".freeze, "lib/more_math/sequence/moving_average.rb".freeze, "lib/more_math/sequence/refinement.rb".freeze, "lib/more_math/string_numeral.rb".freeze, "lib/more_math/subset.rb".freeze, "lib/more_math/version.rb".freeze, "more_math.gemspec".freeze, "tests/cantor_pairing_function_test.rb".freeze, "tests/continued_fraction_test.rb".freeze, "tests/distribution_test.rb".freeze, "tests/entropy_test.rb".freeze, "tests/functions_test.rb".freeze, "tests/histogram_test.rb".freeze, "tests/newton_bisection_test.rb".freeze, "tests/numberify_string_function_test.rb".freeze, "tests/permutation_test.rb".freeze, "tests/sequence/refinement_test.rb".freeze, "tests/sequence_moving_average_test.rb".freeze, "tests/sequence_test.rb".freeze, "tests/string_numeral_test.rb".freeze, "tests/subset_test.rb".freeze, "tests/test_helper.rb".freeze]
14
+ s.extra_rdoc_files = ["README.md".freeze, "lib/more_math.rb".freeze, "lib/more_math/cantor_pairing_function.rb".freeze, "lib/more_math/constants/functions_constants.rb".freeze, "lib/more_math/continued_fraction.rb".freeze, "lib/more_math/distributions.rb".freeze, "lib/more_math/entropy.rb".freeze, "lib/more_math/exceptions.rb".freeze, "lib/more_math/functions.rb".freeze, "lib/more_math/histogram.rb".freeze, "lib/more_math/lambert.rb".freeze, "lib/more_math/linear_regression.rb".freeze, "lib/more_math/newton_bisection.rb".freeze, "lib/more_math/numberify_string_function.rb".freeze, "lib/more_math/permutation.rb".freeze, "lib/more_math/ranking_common.rb".freeze, "lib/more_math/sequence.rb".freeze, "lib/more_math/sequence/moving_average.rb".freeze, "lib/more_math/sequence/refinement.rb".freeze, "lib/more_math/string_numeral.rb".freeze, "lib/more_math/subset.rb".freeze, "lib/more_math/version.rb".freeze]
15
+ s.files = ["CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "lib/more_math.rb".freeze, "lib/more_math/cantor_pairing_function.rb".freeze, "lib/more_math/constants/functions_constants.rb".freeze, "lib/more_math/continued_fraction.rb".freeze, "lib/more_math/distributions.rb".freeze, "lib/more_math/entropy.rb".freeze, "lib/more_math/exceptions.rb".freeze, "lib/more_math/functions.rb".freeze, "lib/more_math/histogram.rb".freeze, "lib/more_math/lambert.rb".freeze, "lib/more_math/linear_regression.rb".freeze, "lib/more_math/newton_bisection.rb".freeze, "lib/more_math/numberify_string_function.rb".freeze, "lib/more_math/permutation.rb".freeze, "lib/more_math/ranking_common.rb".freeze, "lib/more_math/sequence.rb".freeze, "lib/more_math/sequence/moving_average.rb".freeze, "lib/more_math/sequence/refinement.rb".freeze, "lib/more_math/string_numeral.rb".freeze, "lib/more_math/subset.rb".freeze, "lib/more_math/version.rb".freeze, "more_math.gemspec".freeze, "tests/cantor_pairing_function_test.rb".freeze, "tests/continued_fraction_test.rb".freeze, "tests/distribution_test.rb".freeze, "tests/entropy_test.rb".freeze, "tests/functions_test.rb".freeze, "tests/histogram_test.rb".freeze, "tests/lambert_test.rb".freeze, "tests/newton_bisection_test.rb".freeze, "tests/numberify_string_function_test.rb".freeze, "tests/permutation_test.rb".freeze, "tests/sequence/refinement_test.rb".freeze, "tests/sequence_moving_average_test.rb".freeze, "tests/sequence_test.rb".freeze, "tests/string_numeral_test.rb".freeze, "tests/subset_test.rb".freeze, "tests/test_helper.rb".freeze]
16
16
  s.homepage = "https://github.com/flori/more_math".freeze
17
17
  s.licenses = ["MIT".freeze]
18
18
  s.rdoc_options = ["--title".freeze, "MoreMath -- More Math in Ruby".freeze, "--main".freeze, "README.md".freeze]
19
19
  s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
20
- s.rubygems_version = "3.6.9".freeze
20
+ s.rubygems_version = "4.0.3".freeze
21
21
  s.summary = "Library that provides more mathematics.".freeze
22
- s.test_files = ["tests/cantor_pairing_function_test.rb".freeze, "tests/continued_fraction_test.rb".freeze, "tests/distribution_test.rb".freeze, "tests/entropy_test.rb".freeze, "tests/functions_test.rb".freeze, "tests/histogram_test.rb".freeze, "tests/newton_bisection_test.rb".freeze, "tests/numberify_string_function_test.rb".freeze, "tests/permutation_test.rb".freeze, "tests/sequence/refinement_test.rb".freeze, "tests/sequence_moving_average_test.rb".freeze, "tests/sequence_test.rb".freeze, "tests/string_numeral_test.rb".freeze, "tests/subset_test.rb".freeze, "tests/test_helper.rb".freeze]
22
+ s.test_files = ["tests/cantor_pairing_function_test.rb".freeze, "tests/continued_fraction_test.rb".freeze, "tests/distribution_test.rb".freeze, "tests/entropy_test.rb".freeze, "tests/functions_test.rb".freeze, "tests/histogram_test.rb".freeze, "tests/lambert_test.rb".freeze, "tests/newton_bisection_test.rb".freeze, "tests/numberify_string_function_test.rb".freeze, "tests/permutation_test.rb".freeze, "tests/sequence/refinement_test.rb".freeze, "tests/sequence_moving_average_test.rb".freeze, "tests/sequence_test.rb".freeze, "tests/string_numeral_test.rb".freeze, "tests/subset_test.rb".freeze, "tests/test_helper.rb".freeze]
23
23
 
24
24
  s.specification_version = 4
25
25
 
26
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.7".freeze])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.17.0".freeze])
27
27
  s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
28
28
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
29
29
  s.add_development_dependency(%q<test-unit>.freeze, [">= 0".freeze])
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class CantorPairingFunctionTest < Test::Unit::TestCase
7
6
  include MoreMath::Functions
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class ContinuedFractionTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class DistributionTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class EntropyTest < Test::Unit::TestCase
7
6
  include MoreMath::Functions
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class FunctionsTest < Test::Unit::TestCase
7
6
  include MoreMath::Functions
@@ -30,4 +29,14 @@ class FunctionsTest < Test::Unit::TestCase
30
29
  assert_in_delta y, 1 - gammaQ5_2(x), 1E-10
31
30
  end
32
31
  end
32
+
33
+ def test_inclusion_extension_entropy
34
+ assert MoreMath::Functions.respond_to?(:entropy_ratio)
35
+ assert MoreMath::Functions.instance_methods.include?(:entropy_ratio)
36
+ end
37
+
38
+ def test_inclusion_extension_lambert
39
+ assert MoreMath::Functions.respond_to?(:lambert_w)
40
+ assert MoreMath::Functions.instance_methods.include?(:lambert_w)
41
+ end
33
42
  end
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
  require 'stringio'
6
5
 
7
6
  class HistogramTest < Test::Unit::TestCase
@@ -0,0 +1,68 @@
1
+ require 'test_helper'
2
+
3
+ class TestLambertW < Test::Unit::TestCase
4
+ include MoreMath::Functions
5
+
6
+ def setup
7
+ @delta = 1e-10
8
+ end
9
+
10
+ def test_lambert_w_zero
11
+ result = lambert_w(0)
12
+ assert_in_delta(0.0, result, @delta)
13
+ end
14
+
15
+ def test_lambert_w_infinity
16
+ result = lambert_w(Float::INFINITY)
17
+ assert_equal(Float::INFINITY, result)
18
+ end
19
+
20
+ def test_lambert_w_negative_one_over_e
21
+ result = lambert_w(-1.0 / Math::E)
22
+ assert_in_delta(-1.0, result, @delta)
23
+ end
24
+
25
+ def test_lambert_w_positive_value
26
+ result = lambert_w(1)
27
+ expected = 0.5671432904097838
28
+ assert_in_delta(expected, result, @delta)
29
+ end
30
+
31
+ def test_lambert_w_large_positive_value
32
+ result = lambert_w(100)
33
+ expected = 3.3856301402900501
34
+ assert_in_delta(expected, result, @delta)
35
+ end
36
+
37
+ def test_lambert_w_small_positive_value
38
+ result = lambert_w(0.1)
39
+ expected = 0.091276527160862
40
+ assert_in_delta(expected, result, @delta)
41
+ end
42
+
43
+ def test_lambert_w_verify_solution_property
44
+ y = 5.0
45
+ w = lambert_w(y)
46
+ result = w * Math.exp(w)
47
+ assert_in_delta(y, result, @delta)
48
+ end
49
+
50
+ def test_lambert_w_verify_solution_property_large
51
+ y = 1000.0
52
+ w = lambert_w(y)
53
+ result = w * Math.exp(w)
54
+ assert_in_delta(y, result, @delta)
55
+ end
56
+
57
+ def test_lambert_w_domain_error
58
+ result = lambert_w(-1.0 / Math::E - 0.1)
59
+ assert(result.nan?)
60
+ end
61
+
62
+ def test_lambert_w_edge_case
63
+ y = 1e-10
64
+ w = lambert_w(y)
65
+ result = w * Math.exp(w)
66
+ assert_in_delta(y, result, @delta)
67
+ end
68
+ end
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class NewtonBisectionTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class NumberifyStringFunctionTest < Test::Unit::TestCase
7
6
  include MoreMath::Functions
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class PermutationTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  using MoreMath::Sequence::Refinement
7
6
 
@@ -10,4 +9,3 @@ class SequenceTest < Test::Unit::TestCase
10
9
  assert_kind_of MoreMath::Sequence, [1,2,3].to_seq
11
10
  end
12
11
  end
13
-
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class SequenceMovingAverageTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -28,4 +27,3 @@ class SequenceMovingAverageTest < Test::Unit::TestCase
28
27
  assert_equal [ @seq.mean ], @seq.moving_average(5)
29
28
  end
30
29
  end
31
-
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class SequenceTest < Test::Unit::TestCase
7
6
  include MoreMath
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class StringNumeralTest < Test::Unit::TestCase
7
6
  include MoreMath
data/tests/subset_test.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test_helper'
4
- require 'more_math'
5
4
 
6
5
  class SubsetTest < Test::Unit::TestCase
7
6
  include MoreMath
data/tests/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'gem_hadar/simplecov'
2
2
  GemHadar::SimpleCov.start
3
3
  require 'test/unit'
4
+ require 'more_math'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: more_math
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -13,16 +13,16 @@ dependencies:
13
13
  name: gem_hadar
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '2.7'
18
+ version: 2.17.0
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '2.7'
25
+ version: 2.17.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +151,7 @@ extra_rdoc_files:
151
151
  - lib/more_math/exceptions.rb
152
152
  - lib/more_math/functions.rb
153
153
  - lib/more_math/histogram.rb
154
+ - lib/more_math/lambert.rb
154
155
  - lib/more_math/linear_regression.rb
155
156
  - lib/more_math/newton_bisection.rb
156
157
  - lib/more_math/numberify_string_function.rb
@@ -177,6 +178,7 @@ files:
177
178
  - lib/more_math/exceptions.rb
178
179
  - lib/more_math/functions.rb
179
180
  - lib/more_math/histogram.rb
181
+ - lib/more_math/lambert.rb
180
182
  - lib/more_math/linear_regression.rb
181
183
  - lib/more_math/newton_bisection.rb
182
184
  - lib/more_math/numberify_string_function.rb
@@ -195,6 +197,7 @@ files:
195
197
  - tests/entropy_test.rb
196
198
  - tests/functions_test.rb
197
199
  - tests/histogram_test.rb
200
+ - tests/lambert_test.rb
198
201
  - tests/newton_bisection_test.rb
199
202
  - tests/numberify_string_function_test.rb
200
203
  - tests/permutation_test.rb
@@ -226,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
229
  - !ruby/object:Gem::Version
227
230
  version: '0'
228
231
  requirements: []
229
- rubygems_version: 3.6.9
232
+ rubygems_version: 4.0.3
230
233
  specification_version: 4
231
234
  summary: Library that provides more mathematics.
232
235
  test_files:
@@ -236,6 +239,7 @@ test_files:
236
239
  - tests/entropy_test.rb
237
240
  - tests/functions_test.rb
238
241
  - tests/histogram_test.rb
242
+ - tests/lambert_test.rb
239
243
  - tests/newton_bisection_test.rb
240
244
  - tests/numberify_string_function_test.rb
241
245
  - tests/permutation_test.rb