ruby-mpfi 0.0.6 → 0.0.7
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/.gitignore +13 -0
- data/Gemfile +4 -0
- data/README.rdoc +4 -4
- data/Rakefile +2 -45
- data/ext/mpfi/extconf.rb +11 -0
- data/ext/mpfi/ruby_mpfi.c +79 -63
- data/ext/mpfi_complex/mpfi/extconf.rb +11 -0
- data/ext/mpfi_complex/mpfi/ruby_mpfi_complex.c +14 -12
- data/ext/mpfi_matrix/mpfi/extconf.rb +14 -0
- data/ext/mpfi_matrix/mpfi/func_mpfi_matrix.c +17 -17
- data/ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c +91 -78
- data/lib/mpfi/version.rb +3 -1
- data/ruby-mpfi.gemspec +19 -31
- data/spec/mpfi/marshal_spec.rb +18 -0
- data/spec/mpfi_matrix/mpfi_matrix_marshal_spec.rb +65 -0
- metadata +65 -72
- data/.gemtest +0 -0
- data/Manifest.txt +0 -55
- data/PostInstall.txt +0 -7
- data/ext/mpfi/ruby_mpfr.h +0 -44
- data/ext/mpfi_complex/mpfi/ruby_mpfi.h +0 -42
- data/ext/mpfi_complex/mpfi/ruby_mpfr.h +0 -44
- data/ext/mpfi_matrix/mpfi/func_mpfr_matrix.h +0 -72
- data/ext/mpfi_matrix/mpfi/ruby_mpfi.h +0 -42
- data/ext/mpfi_matrix/mpfi/ruby_mpfr.h +0 -44
- data/ext/mpfi_matrix/mpfi/ruby_mpfr_matrix.h +0 -13
- data/tasks/extconf.rake +0 -36
data/lib/mpfi/version.rb
CHANGED
data/ruby-mpfi.gemspec
CHANGED
@@ -1,38 +1,26 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "mpfi/version"
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
|
-
s.name
|
5
|
-
s.version
|
6
|
+
s.name = "ruby-mpfi"
|
7
|
+
s.version = MPFI::VERSION
|
8
|
+
s.authors = ["Takayuki YAMAGUCHI"]
|
9
|
+
s.email = ["d@ytak.info"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = "Ruby bindings of MPFI"
|
12
|
+
s.description = "Ruby bindings of MPFI that is a C library for interval arithmetic of multiple precision."
|
6
13
|
|
7
|
-
s.
|
8
|
-
s.authors = ["Takayuki YAMAGUCHI"]
|
9
|
-
s.date = %q{2011-02-15}
|
10
|
-
s.description = %q{ruby-mpfi is an extended C library to use MPFI[http://gforge.inria.fr/projects/mpfi/]
|
11
|
-
which is the library of the interval arithmetic with multiprecision.}
|
12
|
-
s.email = ["d@ytak.info"]
|
13
|
-
s.extensions = ["ext/mpfi/extconf.rb", "ext/mpfi_complex/mpfi/extconf.rb", "ext/mpfi_matrix/mpfi/extconf.rb"]
|
14
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
|
15
|
-
s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "ext/mpfi/extconf.rb", "ext/mpfi/func_mpfi_extention.c", "ext/mpfi/func_mpfi_extention.h", "ext/mpfi/ruby_mpfi.c", "ext/mpfi/ruby_mpfi.h", "ext/mpfi/ruby_mpfr.h", "ext/mpfi_complex/mpfi/extconf.rb", "ext/mpfi_complex/mpfi/func_mpfi_extention.h", "ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.c", "ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.h", "ext/mpfi_complex/mpfi/ruby_mpfi.h", "ext/mpfi_complex/mpfi/ruby_mpfi_complex.c", "ext/mpfi_complex/mpfi/ruby_mpfi_complex.h", "ext/mpfi_complex/mpfi/ruby_mpfr.h", "ext/mpfi_matrix/mpfi/extconf.rb", "ext/mpfi_matrix/mpfi/func_mpfi_extention.h", "ext/mpfi_matrix/mpfi/func_mpfi_matrix.c", "ext/mpfi_matrix/mpfi/func_mpfi_matrix.h", "ext/mpfi_matrix/mpfi/func_mpfr_matrix.h", "ext/mpfi_matrix/mpfi/ruby_mpfi.h", "ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c", "ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.h", "ext/mpfi_matrix/mpfi/ruby_mpfr.h", "ext/mpfi_matrix/mpfi/ruby_mpfr_matrix.h", "lib/mpfi/matrix.rb", "lib/mpfi/version.rb", "ruby-mpfi.gemspec", "spec/mpfi/generate_number_module.rb", "spec/mpfi/mpfi_alloc_spec.rb", "spec/mpfi/mpfi_diam_arithmetic_spec.rb", "spec/mpfi/mpfi_interval_arithmetic_spec.rb", "spec/mpfi/mpfi_interval_functions_spec.rb", "spec/mpfi/mpfi_math_functions_spec.rb", "spec/mpfi/mpfi_set_operation_spec.rb", "spec/mpfi/ruby-mpfi_spec.rb", "spec/mpfi/spec_helper.rb", "spec/mpfi/string_spec.rb", "spec/mpfi_complex/spec_helper.rb", "spec/mpfi_matrix/generate_matrix_arguments.rb", "spec/mpfi_matrix/mpfi_matrix_alloc_spec.rb", "spec/mpfi_matrix/mpfi_matrix_arithmetic_spec.rb", "spec/mpfi_matrix/mpfi_matrix_interval_func_spec.rb", "spec/mpfi_matrix/mpfi_matrix_set_element_spec.rb", "spec/mpfi_matrix/mpfi_matrix_set_operation_spec.rb", "spec/mpfi_matrix/mpfi_matrix_string_spec.rb", "spec/mpfi_matrix/mpfi_matrix_subdivision_spec.rb", "spec/mpfi_matrix/mpfi_square_matrix_spec.rb", "spec/mpfi_matrix/mpfi_vector_spec.rb", "spec/mpfi_matrix/spec_helper.rb", "tasks/extconf.rake", ".gemtest"]
|
16
|
-
s.homepage = %q{http://rubyforge.org/projects/ruby-mpfr/}
|
17
|
-
s.post_install_message = %q{PostInstall.txt}
|
18
|
-
s.rdoc_options = ["--main", "README.rdoc"]
|
19
|
-
s.require_paths = ["lib"]
|
20
|
-
s.rubyforge_project = %q{ruby-mpfi}
|
21
|
-
s.rubygems_version = %q{1.5.2}
|
22
|
-
s.summary = %q{ruby-mpfi is an extended C library to use MPFI[http://gforge.inria.fr/projects/mpfi/] which is the library of the interval arithmetic with multiprecision.}
|
14
|
+
s.rubyforge_project = "ruby-mpfi"
|
23
15
|
|
24
|
-
|
25
|
-
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib", "ext", "ext/mpfi_complex", "ext/mpfi_matrix"]
|
20
|
+
s.extensions = Dir.glob('ext/**/extconf.rb')
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
s.add_dependency(%q<ruby-mpfr>, [">= 0.0.4"])
|
32
|
-
s.add_dependency(%q<hoe>, [">= 2.9.1"])
|
33
|
-
end
|
34
|
-
else
|
35
|
-
s.add_dependency(%q<ruby-mpfr>, [">= 0.0.4"])
|
36
|
-
s.add_dependency(%q<hoe>, [">= 2.9.1"])
|
37
|
-
end
|
22
|
+
# specify any dependencies here; for example:
|
23
|
+
s.add_development_dependency "rspec"
|
24
|
+
s.add_development_dependency "yard"
|
25
|
+
s.add_runtime_dependency "ruby-mpfr"
|
38
26
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__)) + '/spec_helper.rb'
|
2
|
+
|
3
|
+
describe MPFI do
|
4
|
+
context "when marshaling" do
|
5
|
+
before(:all) do
|
6
|
+
MPFR.set_default_prec(256)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should restore regular numbers" do
|
10
|
+
GenerateNumber.string(1000).each do |s|
|
11
|
+
n = MPFI(s, 128)
|
12
|
+
n2 = Marshal.load(Marshal.dump(n))
|
13
|
+
n2.should == n
|
14
|
+
n2.get_prec.should == 128
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__)) + '/spec_helper.rb'
|
2
|
+
|
3
|
+
describe MPFI::Matrix, "when marshaling" do
|
4
|
+
before(:all) do
|
5
|
+
MPFR.set_default_prec(128)
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should be restore" do
|
9
|
+
row = 8
|
10
|
+
column = 3
|
11
|
+
args = GenerateNumber.float_matrix_arguments(1000, row, column).map{ |a| MPFI::Matrix.new(a) }
|
12
|
+
args.each do |m|
|
13
|
+
m2 = Marshal.load(Marshal.dump(m))
|
14
|
+
m2.should == m
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe MPFI::SquareMatrix, "when marshaling" do
|
20
|
+
before(:all) do
|
21
|
+
MPFR.set_default_prec(128)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should be restore" do
|
25
|
+
row = 4
|
26
|
+
column = 4
|
27
|
+
args = GenerateNumber.float_matrix_arguments(1000, row, column).map{ |a| MPFI::SquareMatrix.new(a) }
|
28
|
+
args.each do |m|
|
29
|
+
m2 = Marshal.load(Marshal.dump(m))
|
30
|
+
m2.should == m
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe MPFI::ColumnVector, "when marshaling" do
|
36
|
+
before(:all) do
|
37
|
+
MPFR.set_default_prec(128)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should be restore" do
|
41
|
+
row = 1
|
42
|
+
column = 6
|
43
|
+
args = GenerateNumber.float_matrix_arguments(1000, row, column).map{ |a| MPFI::ColumnVector.new(a[0]) }
|
44
|
+
args.each do |m|
|
45
|
+
m2 = Marshal.load(Marshal.dump(m))
|
46
|
+
m2.should == m
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe MPFI::RowVector, "when marshaling" do
|
52
|
+
before(:all) do
|
53
|
+
MPFR.set_default_prec(128)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should be restore" do
|
57
|
+
row = 1
|
58
|
+
column = 6
|
59
|
+
args = GenerateNumber.float_matrix_arguments(1000, row, column).map{ |a| MPFI::RowVector.new(a[0]) }
|
60
|
+
args.each do |m|
|
61
|
+
m2 = Marshal.load(Marshal.dump(m))
|
62
|
+
m2.should == m
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,60 +1,63 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-mpfi
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.7
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.6
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Takayuki YAMAGUCHI
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
name: ruby-mpfr
|
18
|
-
prerelease: false
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2011-08-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: &19920800 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: 0
|
25
|
-
type: :
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: hoe
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *19920800
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: yard
|
27
|
+
requirement: &19920380 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
36
33
|
type: :development
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *19920380
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: ruby-mpfr
|
38
|
+
requirement: &19919900 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *19919900
|
47
|
+
description: Ruby bindings of MPFI that is a C library for interval arithmetic of
|
48
|
+
multiple precision.
|
49
|
+
email:
|
42
50
|
- d@ytak.info
|
43
51
|
executables: []
|
44
|
-
|
45
|
-
extensions:
|
46
|
-
- ext/mpfi/extconf.rb
|
52
|
+
extensions:
|
47
53
|
- ext/mpfi_complex/mpfi/extconf.rb
|
48
54
|
- ext/mpfi_matrix/mpfi/extconf.rb
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
files:
|
55
|
+
- ext/mpfi/extconf.rb
|
56
|
+
extra_rdoc_files: []
|
57
|
+
files:
|
58
|
+
- .gitignore
|
59
|
+
- Gemfile
|
55
60
|
- History.txt
|
56
|
-
- Manifest.txt
|
57
|
-
- PostInstall.txt
|
58
61
|
- README.rdoc
|
59
62
|
- Rakefile
|
60
63
|
- ext/mpfi/extconf.rb
|
@@ -62,29 +65,23 @@ files:
|
|
62
65
|
- ext/mpfi/func_mpfi_extention.h
|
63
66
|
- ext/mpfi/ruby_mpfi.c
|
64
67
|
- ext/mpfi/ruby_mpfi.h
|
65
|
-
- ext/mpfi/ruby_mpfr.h
|
66
68
|
- ext/mpfi_complex/mpfi/extconf.rb
|
67
69
|
- ext/mpfi_complex/mpfi/func_mpfi_extention.h
|
68
70
|
- ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.c
|
69
71
|
- ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.h
|
70
|
-
- ext/mpfi_complex/mpfi/ruby_mpfi.h
|
71
72
|
- ext/mpfi_complex/mpfi/ruby_mpfi_complex.c
|
72
73
|
- ext/mpfi_complex/mpfi/ruby_mpfi_complex.h
|
73
|
-
- ext/mpfi_complex/mpfi/ruby_mpfr.h
|
74
74
|
- ext/mpfi_matrix/mpfi/extconf.rb
|
75
75
|
- ext/mpfi_matrix/mpfi/func_mpfi_extention.h
|
76
76
|
- ext/mpfi_matrix/mpfi/func_mpfi_matrix.c
|
77
77
|
- ext/mpfi_matrix/mpfi/func_mpfi_matrix.h
|
78
|
-
- ext/mpfi_matrix/mpfi/func_mpfr_matrix.h
|
79
|
-
- ext/mpfi_matrix/mpfi/ruby_mpfi.h
|
80
78
|
- ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c
|
81
79
|
- ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.h
|
82
|
-
- ext/mpfi_matrix/mpfi/ruby_mpfr.h
|
83
|
-
- ext/mpfi_matrix/mpfi/ruby_mpfr_matrix.h
|
84
80
|
- lib/mpfi/matrix.rb
|
85
81
|
- lib/mpfi/version.rb
|
86
82
|
- ruby-mpfi.gemspec
|
87
83
|
- spec/mpfi/generate_number_module.rb
|
84
|
+
- spec/mpfi/marshal_spec.rb
|
88
85
|
- spec/mpfi/mpfi_alloc_spec.rb
|
89
86
|
- spec/mpfi/mpfi_diam_arithmetic_spec.rb
|
90
87
|
- spec/mpfi/mpfi_interval_arithmetic_spec.rb
|
@@ -99,6 +96,7 @@ files:
|
|
99
96
|
- spec/mpfi_matrix/mpfi_matrix_alloc_spec.rb
|
100
97
|
- spec/mpfi_matrix/mpfi_matrix_arithmetic_spec.rb
|
101
98
|
- spec/mpfi_matrix/mpfi_matrix_interval_func_spec.rb
|
99
|
+
- spec/mpfi_matrix/mpfi_matrix_marshal_spec.rb
|
102
100
|
- spec/mpfi_matrix/mpfi_matrix_set_element_spec.rb
|
103
101
|
- spec/mpfi_matrix/mpfi_matrix_set_operation_spec.rb
|
104
102
|
- spec/mpfi_matrix/mpfi_matrix_string_spec.rb
|
@@ -106,36 +104,31 @@ files:
|
|
106
104
|
- spec/mpfi_matrix/mpfi_square_matrix_spec.rb
|
107
105
|
- spec/mpfi_matrix/mpfi_vector_spec.rb
|
108
106
|
- spec/mpfi_matrix/spec_helper.rb
|
109
|
-
|
110
|
-
- .gemtest
|
111
|
-
has_rdoc: true
|
112
|
-
homepage: http://rubyforge.org/projects/ruby-mpfr/
|
107
|
+
homepage: ''
|
113
108
|
licenses: []
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
- --main
|
118
|
-
- README.rdoc
|
119
|
-
require_paths:
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
120
112
|
- lib
|
121
|
-
|
113
|
+
- ext
|
114
|
+
- ext/mpfi_complex
|
115
|
+
- ext/mpfi_matrix
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
117
|
none: false
|
123
|
-
requirements:
|
124
|
-
- -
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version:
|
127
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
123
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version:
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
133
128
|
requirements: []
|
134
|
-
|
135
129
|
rubyforge_project: ruby-mpfi
|
136
|
-
rubygems_version: 1.
|
130
|
+
rubygems_version: 1.8.9
|
137
131
|
signing_key:
|
138
132
|
specification_version: 3
|
139
|
-
summary:
|
133
|
+
summary: Ruby bindings of MPFI
|
140
134
|
test_files: []
|
141
|
-
|
data/.gemtest
DELETED
File without changes
|
data/Manifest.txt
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
PostInstall.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
ext/mpfi/extconf.rb
|
7
|
-
ext/mpfi/func_mpfi_extention.c
|
8
|
-
ext/mpfi/func_mpfi_extention.h
|
9
|
-
ext/mpfi/ruby_mpfi.c
|
10
|
-
ext/mpfi/ruby_mpfi.h
|
11
|
-
ext/mpfi/ruby_mpfr.h
|
12
|
-
ext/mpfi_complex/mpfi/extconf.rb
|
13
|
-
ext/mpfi_complex/mpfi/func_mpfi_extention.h
|
14
|
-
ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.c
|
15
|
-
ext/mpfi_complex/mpfi/func_ruby_mpfi_complex.h
|
16
|
-
ext/mpfi_complex/mpfi/ruby_mpfi.h
|
17
|
-
ext/mpfi_complex/mpfi/ruby_mpfi_complex.c
|
18
|
-
ext/mpfi_complex/mpfi/ruby_mpfi_complex.h
|
19
|
-
ext/mpfi_complex/mpfi/ruby_mpfr.h
|
20
|
-
ext/mpfi_matrix/mpfi/extconf.rb
|
21
|
-
ext/mpfi_matrix/mpfi/func_mpfi_extention.h
|
22
|
-
ext/mpfi_matrix/mpfi/func_mpfi_matrix.c
|
23
|
-
ext/mpfi_matrix/mpfi/func_mpfi_matrix.h
|
24
|
-
ext/mpfi_matrix/mpfi/func_mpfr_matrix.h
|
25
|
-
ext/mpfi_matrix/mpfi/ruby_mpfi.h
|
26
|
-
ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c
|
27
|
-
ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.h
|
28
|
-
ext/mpfi_matrix/mpfi/ruby_mpfr.h
|
29
|
-
ext/mpfi_matrix/mpfi/ruby_mpfr_matrix.h
|
30
|
-
lib/mpfi/matrix.rb
|
31
|
-
lib/mpfi/version.rb
|
32
|
-
ruby-mpfi.gemspec
|
33
|
-
spec/mpfi/generate_number_module.rb
|
34
|
-
spec/mpfi/mpfi_alloc_spec.rb
|
35
|
-
spec/mpfi/mpfi_diam_arithmetic_spec.rb
|
36
|
-
spec/mpfi/mpfi_interval_arithmetic_spec.rb
|
37
|
-
spec/mpfi/mpfi_interval_functions_spec.rb
|
38
|
-
spec/mpfi/mpfi_math_functions_spec.rb
|
39
|
-
spec/mpfi/mpfi_set_operation_spec.rb
|
40
|
-
spec/mpfi/ruby-mpfi_spec.rb
|
41
|
-
spec/mpfi/spec_helper.rb
|
42
|
-
spec/mpfi/string_spec.rb
|
43
|
-
spec/mpfi_complex/spec_helper.rb
|
44
|
-
spec/mpfi_matrix/generate_matrix_arguments.rb
|
45
|
-
spec/mpfi_matrix/mpfi_matrix_alloc_spec.rb
|
46
|
-
spec/mpfi_matrix/mpfi_matrix_arithmetic_spec.rb
|
47
|
-
spec/mpfi_matrix/mpfi_matrix_interval_func_spec.rb
|
48
|
-
spec/mpfi_matrix/mpfi_matrix_set_element_spec.rb
|
49
|
-
spec/mpfi_matrix/mpfi_matrix_set_operation_spec.rb
|
50
|
-
spec/mpfi_matrix/mpfi_matrix_string_spec.rb
|
51
|
-
spec/mpfi_matrix/mpfi_matrix_subdivision_spec.rb
|
52
|
-
spec/mpfi_matrix/mpfi_square_matrix_spec.rb
|
53
|
-
spec/mpfi_matrix/mpfi_vector_spec.rb
|
54
|
-
spec/mpfi_matrix/spec_helper.rb
|
55
|
-
tasks/extconf.rake
|
data/PostInstall.txt
DELETED
data/ext/mpfi/ruby_mpfr.h
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
#ifndef _RUBY_MPFR_H_
|
2
|
-
#define _RUBY_MPFR_H_
|
3
|
-
|
4
|
-
#include <ruby.h>
|
5
|
-
#include <mpfr.h>
|
6
|
-
#include <stdio.h>
|
7
|
-
|
8
|
-
typedef __mpfr_struct MPFR;
|
9
|
-
|
10
|
-
VALUE r_mpfr_class, r_mpfr_math;
|
11
|
-
|
12
|
-
#define r_mpfr_make_struct(ruby_var, c_var) { ruby_var = Data_Make_Struct(r_mpfr_class, MPFR, 0, r_mpfr_free, c_var); }
|
13
|
-
#define r_mpfr_make_struct_init(ruby_var, c_var) { r_mpfr_make_struct(ruby_var, c_var); mpfr_init(c_var); }
|
14
|
-
#define r_mpfr_make_struct_init2(ruby_var, c_var, prec) { r_mpfr_make_struct(ruby_var, c_var); mpfr_init2(c_var, prec); }
|
15
|
-
#define r_mpfr_get_struct(c_var, ruby_var) { Data_Get_Struct(ruby_var, MPFR, c_var); }
|
16
|
-
|
17
|
-
#define r_mpfr_temp_alloc(var) { var=ALLOC_N(MPFR, 1); }
|
18
|
-
#define r_mpfr_temp_alloc_init(var) { r_mpfr_temp_alloc(var); mpfr_init(var); }
|
19
|
-
#define r_mpfr_temp_alloc_init2(var, prec) { r_mpfr_temp_alloc(var); mpfr_init2(var, prec); }
|
20
|
-
#define r_mpfr_temp_free(var) { mpfr_clear(var); free(var); }
|
21
|
-
|
22
|
-
#define r_mpfr_check_number(c_val) { if(mpfr_number_p(c_val) == 0) rb_raise(rb_eArgError, "Not an ordinary number."); }
|
23
|
-
#define r_mpfr_check_positive_number(c_val) { if(mpfr_number_p(c_val) == 0 && mpfr_sgn(c_val) <= 0) rb_raise(rb_eArgError, "Not a positive number."); }
|
24
|
-
#define r_mpfr_check_non_negative_number(c_val) { if(mpfr_number_p(c_val) == 0 && mpfr_sgn(c_val) < 0) rb_raise(rb_eArgError, "Not a non negative number."); }
|
25
|
-
#define r_mpfr_check_negative_number(c_val) { if(mpfr_number_p(c_val) == 0 && mpfr_sgn(c_val) >= 0) rb_raise(rb_eArgError, "Not a negative number."); }
|
26
|
-
#define r_mpfr_check_non_positive_number(c_val) { if(mpfr_number_p(c_val) == 0 && mpfr_sgn(c_val) > 0) rb_raise(rb_eArgError, "Not a non positive number."); }
|
27
|
-
|
28
|
-
void r_mpfr_free(void *ptr);
|
29
|
-
VALUE r_mpfr_make_new_fr_obj(MPFR *ptr);
|
30
|
-
VALUE r_mpfr_make_new_fr_obj2(MPFR *ptr, int prec);
|
31
|
-
VALUE r_mpfr_new_fr_obj(VALUE obj);
|
32
|
-
void r_mpfr_set_robj(MPFR *ptr, VALUE obj, mp_rnd_t rnd);
|
33
|
-
VALUE r_mpfr_robj_to_mpfr(VALUE obj, int argc, VALUE *argv);
|
34
|
-
|
35
|
-
mp_rnd_t r_mpfr_rnd_from_value(VALUE rnd);
|
36
|
-
mp_rnd_t r_mpfr_rnd_from_optional_argument(int min, int max, int argc, VALUE *argv);
|
37
|
-
mp_rnd_t r_mpfr_prec_from_optional_argument(int min, int max, int argc, VALUE *argv);
|
38
|
-
void r_mpfr_get_rnd_prec_from_optional_arguments(mp_rnd_t *rnd, mp_prec_t *prec, int min, int max, int argc, VALUE *argv);
|
39
|
-
|
40
|
-
char *r_mpfr_dump_to_string(MPFR *ptr_s);
|
41
|
-
void r_mpfr_load_string(MPFR *ptr_s, const char *dump);
|
42
|
-
|
43
|
-
#endif /* _RUBY_MPFR_H_ */
|
44
|
-
|