frac 0.9.4 → 0.9.5
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.
- data/README.rdoc +4 -0
- data/VERSION +1 -1
- data/frac.gemspec +2 -2
- metadata +15 -45
- data/Gemfile +0 -10
- data/Rakefile +0 -77
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.5
|
2
2
|
|
data/frac.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{frac}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Pavel Valodzka"]
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"test/frac_test.rb"
|
28
28
|
]
|
29
29
|
s.homepage = %q{https://github.com/valodzka/frac}
|
30
|
-
s.licenses = [""]
|
30
|
+
s.licenses = ["MIT license"]
|
31
31
|
s.require_paths = ["lib"]
|
32
32
|
s.rubygems_version = %q{1.6.2}
|
33
33
|
s.summary = %q{Find rational approximation to given real number. Based on the theory of continued fractions if x = a1 + 1/(a2 + 1/(a3 + 1/(a4 + ...))) then best approximation is found by truncating this series (with some adjustments in the last term). Note the fraction can be recovered as the first column of the matrix ( a1 1 ) ( a2 1 ) ( a3 1 ) ... ( 1 0 ) ( 1 0 ) ( 1 0 ) Instead of keeping the sequence of continued fraction terms, we just keep the last partial product of these matrices.}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 5
|
10
|
+
version: 0.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pavel Valodzka
|
@@ -15,28 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-19 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
|
-
type: :development
|
24
22
|
name: rake
|
25
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ">="
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 3
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
version: "0"
|
34
|
-
requirement: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
23
|
prerelease: false
|
37
|
-
|
38
|
-
name: jeweler
|
39
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
40
25
|
none: false
|
41
26
|
requirements:
|
42
27
|
- - ">="
|
@@ -45,26 +30,12 @@ dependencies:
|
|
45
30
|
segments:
|
46
31
|
- 0
|
47
32
|
version: "0"
|
48
|
-
requirement: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
prerelease: false
|
51
33
|
type: :development
|
52
|
-
|
53
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
|
-
requirements:
|
56
|
-
- - ">="
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
hash: 3
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
version: "0"
|
62
|
-
requirement: *id003
|
34
|
+
version_requirements: *id001
|
63
35
|
- !ruby/object:Gem::Dependency
|
36
|
+
name: jeweler
|
64
37
|
prerelease: false
|
65
|
-
|
66
|
-
name: rdoc
|
67
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
68
39
|
none: false
|
69
40
|
requirements:
|
70
41
|
- - ">="
|
@@ -73,12 +44,12 @@ dependencies:
|
|
73
44
|
segments:
|
74
45
|
- 0
|
75
46
|
version: "0"
|
76
|
-
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
77
49
|
- !ruby/object:Gem::Dependency
|
50
|
+
name: rcov
|
78
51
|
prerelease: false
|
79
|
-
|
80
|
-
name: rake-compiler
|
81
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
82
53
|
none: false
|
83
54
|
requirements:
|
84
55
|
- - ">="
|
@@ -87,7 +58,8 @@ dependencies:
|
|
87
58
|
segments:
|
88
59
|
- 0
|
89
60
|
version: "0"
|
90
|
-
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
91
63
|
description:
|
92
64
|
email: pavel@valodzka.name
|
93
65
|
executables: []
|
@@ -97,9 +69,7 @@ extensions:
|
|
97
69
|
extra_rdoc_files:
|
98
70
|
- README.rdoc
|
99
71
|
files:
|
100
|
-
- Gemfile
|
101
72
|
- README.rdoc
|
102
|
-
- Rakefile
|
103
73
|
- VERSION
|
104
74
|
- ext/extconf.rb
|
105
75
|
- ext/frac_ext.c
|
@@ -111,7 +81,7 @@ files:
|
|
111
81
|
has_rdoc: true
|
112
82
|
homepage: https://github.com/valodzka/frac
|
113
83
|
licenses:
|
114
|
-
-
|
84
|
+
- MIT license
|
115
85
|
post_install_message:
|
116
86
|
rdoc_options: []
|
117
87
|
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
|
4
|
-
begin
|
5
|
-
Bundler.setup(:default, :development)
|
6
|
-
rescue Bundler::BundlerError => e
|
7
|
-
$stderr.puts e.message
|
8
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
9
|
-
exit e.status_code
|
10
|
-
end
|
11
|
-
|
12
|
-
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
gem.name = %q{frac}
|
17
|
-
gem.homepage = %q{https://github.com/valodzka/frac}
|
18
|
-
gem.license = %q{}
|
19
|
-
gem.summary = %q{Find rational approximation to given real number}
|
20
|
-
gem.email = %q{pavel@valodzka.name}
|
21
|
-
gem.authors = [%q{Pavel Valodzka}]
|
22
|
-
gem.extensions = ["ext/extconf.rb"]
|
23
|
-
gem.require_paths = ["lib"]
|
24
|
-
gem.summary = <<-RDOC
|
25
|
-
Find rational approximation to given real number.
|
26
|
-
|
27
|
-
Based on the theory of continued fractions
|
28
|
-
|
29
|
-
if x = a1 + 1/(a2 + 1/(a3 + 1/(a4 + ...)))
|
30
|
-
|
31
|
-
then best approximation is found by truncating this series
|
32
|
-
(with some adjustments in the last term).
|
33
|
-
Note the fraction can be recovered as the first column of the matrix
|
34
|
-
|
35
|
-
( a1 1 ) ( a2 1 ) ( a3 1 ) ...
|
36
|
-
( 1 0 ) ( 1 0 ) ( 1 0 )
|
37
|
-
|
38
|
-
Instead of keeping the sequence of continued fraction terms,
|
39
|
-
we just keep the last partial product of these matrices.
|
40
|
-
RDOC
|
41
|
-
end
|
42
|
-
|
43
|
-
require 'rake/extensiontask'
|
44
|
-
Rake::ExtensionTask.new do |ext|
|
45
|
-
ext.ext_dir = 'ext'
|
46
|
-
ext.lib_dir = 'lib'
|
47
|
-
ext.name = 'frac_ext'
|
48
|
-
end
|
49
|
-
|
50
|
-
Jeweler::RubygemsDotOrgTasks.new
|
51
|
-
|
52
|
-
require 'rake/testtask'
|
53
|
-
Rake::TestTask.new(:test) do |test|
|
54
|
-
test.libs << 'lib' << 'test'
|
55
|
-
test.pattern = 'test/**/*.rb'
|
56
|
-
test.verbose = true
|
57
|
-
end
|
58
|
-
|
59
|
-
require 'rcov/rcovtask'
|
60
|
-
Rcov::RcovTask.new do |test|
|
61
|
-
test.libs << 'test'
|
62
|
-
test.pattern = 'test/**/*.rb'
|
63
|
-
test.verbose = true
|
64
|
-
end
|
65
|
-
|
66
|
-
task :default => [ :compile, :test ]
|
67
|
-
|
68
|
-
require 'rdoc/task'
|
69
|
-
Rake::RDocTask.new do |rdoc|
|
70
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
71
|
-
|
72
|
-
rdoc.rdoc_dir = 'rdoc'
|
73
|
-
rdoc.title = "frac #{version}"
|
74
|
-
rdoc.rdoc_files.include('README*')
|
75
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
76
|
-
end
|
77
|
-
|