ruby-mpfr 0.0.2 → 0.0.4

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.
Files changed (42) hide show
  1. data/History.txt +5 -2
  2. data/Manifest.txt +33 -7
  3. data/README.rdoc +10 -8
  4. data/Rakefile +4 -3
  5. data/ext/{extconf.rb → mpfr/extconf.rb} +4 -0
  6. data/ext/{ruby_mpfr.c → mpfr/ruby_mpfr.c} +466 -199
  7. data/ext/{ruby_mpfr.h → mpfr/ruby_mpfr.h} +2 -0
  8. data/ext/mpfr_matrix/mpfr/extconf.rb +7 -0
  9. data/ext/mpfr_matrix/mpfr/func_mpfr_matrix.c +524 -0
  10. data/ext/mpfr_matrix/mpfr/func_mpfr_matrix.h +72 -0
  11. data/ext/mpfr_matrix/mpfr/ruby_mpfr.h +40 -0
  12. data/ext/mpfr_matrix/mpfr/ruby_mpfr_matrix.c +1056 -0
  13. data/ext/mpfr_matrix/mpfr/ruby_mpfr_matrix.h +13 -0
  14. data/lib/mpfr/matrix.rb +145 -0
  15. data/lib/mpfr/version.rb +3 -0
  16. data/ruby-mpfr.gemspec +36 -0
  17. data/spec/mpfr/allocate_spec.rb +60 -0
  18. data/spec/mpfr/arithmetic_spec.rb +64 -0
  19. data/spec/mpfr/comparison_spec.rb +21 -0
  20. data/spec/mpfr/constant_spec.rb +23 -0
  21. data/spec/mpfr/conversion_spec.rb +14 -0
  22. data/spec/mpfr/exception_spec.rb +60 -0
  23. data/spec/mpfr/functions_spec.rb +25 -0
  24. data/spec/mpfr/generate_number_modulue.rb +44 -0
  25. data/spec/mpfr/precision_roundmode_spec.rb +65 -0
  26. data/spec/mpfr/rounding_spec.rb +51 -0
  27. data/spec/mpfr/set_value_spec.rb +77 -0
  28. data/spec/mpfr/spec_helper.rb +13 -0
  29. data/spec/mpfr/string_spec.rb +58 -0
  30. data/spec/mpfr_matrix/generate_matrix_arguments.rb +55 -0
  31. data/spec/mpfr_matrix/mpfr_matrix_alloc_spec.rb +126 -0
  32. data/spec/mpfr_matrix/mpfr_matrix_arithmetic_spec.rb +93 -0
  33. data/spec/mpfr_matrix/mpfr_matrix_set_element_spec.rb +55 -0
  34. data/spec/mpfr_matrix/mpfr_matrix_string_spec.rb +31 -0
  35. data/spec/mpfr_matrix/mpfr_square_matrix_spec.rb +75 -0
  36. data/spec/mpfr_matrix/spec_helper.rb +16 -0
  37. data/tasks/extconf.rake +36 -0
  38. metadata +48 -16
  39. data/lib/ruby-mpfr.rb +0 -6
  40. data/spec/ruby-mpfr_spec.rb +0 -11
  41. data/spec/spec_helper.rb +0 -10
  42. data/tasks/rspec.rake +0 -21
data/History.txt CHANGED
@@ -1,9 +1,12 @@
1
1
  # -*- rd -*-
2
+ === 0.0.4 2009-12-17
3
+ * 1 major enhancements
4
+ * Add MPFR::Matrix
2
5
 
3
6
  === 0.0.2 2009-07-25
4
7
  * 2 minor enhancements:
5
- * Add comments in a source file.
6
- * Add method MPFR::Math.sum.
8
+ * Add comments in a source file
9
+ * Add method MPFR::Math.sum
7
10
 
8
11
  === 0.0.1 2009-07-11
9
12
 
data/Manifest.txt CHANGED
@@ -3,14 +3,40 @@ Manifest.txt
3
3
  PostInstall.txt
4
4
  README.rdoc
5
5
  Rakefile
6
- lib/ruby-mpfr.rb
7
- ext/ruby_mpfr.c
8
- ext/ruby_mpfr.h
9
- ext/extconf.rb
6
+ ext/mpfr/extconf.rb
7
+ ext/mpfr/ruby_mpfr.c
8
+ ext/mpfr/ruby_mpfr.h
9
+ ext/mpfr_matrix/mpfr/extconf.rb
10
+ ext/mpfr_matrix/mpfr/func_mpfr_matrix.c
11
+ ext/mpfr_matrix/mpfr/func_mpfr_matrix.h
12
+ ext/mpfr_matrix/mpfr/ruby_mpfr.h
13
+ ext/mpfr_matrix/mpfr/ruby_mpfr_matrix.c
14
+ ext/mpfr_matrix/mpfr/ruby_mpfr_matrix.h
15
+ lib/mpfr/matrix.rb
16
+ lib/mpfr/version.rb
17
+ ruby-mpfr.gemspec
10
18
  script/console
11
19
  script/destroy
12
20
  script/generate
13
- spec/ruby-mpfr_spec.rb
21
+ spec/mpfr/allocate_spec.rb
22
+ spec/mpfr/arithmetic_spec.rb
23
+ spec/mpfr/comparison_spec.rb
24
+ spec/mpfr/constant_spec.rb
25
+ spec/mpfr/conversion_spec.rb
26
+ spec/mpfr/exception_spec.rb
27
+ spec/mpfr/functions_spec.rb
28
+ spec/mpfr/generate_number_modulue.rb
29
+ spec/mpfr/precision_roundmode_spec.rb
30
+ spec/mpfr/rounding_spec.rb
31
+ spec/mpfr/set_value_spec.rb
32
+ spec/mpfr/spec_helper.rb
33
+ spec/mpfr/string_spec.rb
34
+ spec/mpfr_matrix/generate_matrix_arguments.rb
35
+ spec/mpfr_matrix/mpfr_matrix_alloc_spec.rb
36
+ spec/mpfr_matrix/mpfr_matrix_arithmetic_spec.rb
37
+ spec/mpfr_matrix/mpfr_matrix_set_element_spec.rb
38
+ spec/mpfr_matrix/mpfr_matrix_string_spec.rb
39
+ spec/mpfr_matrix/mpfr_square_matrix_spec.rb
40
+ spec/mpfr_matrix/spec_helper.rb
14
41
  spec/spec.opts
15
- spec/spec_helper.rb
16
- tasks/rspec.rake
42
+ tasks/extconf.rake
data/README.rdoc CHANGED
@@ -1,10 +1,10 @@
1
1
  = ruby-mpfr
2
2
 
3
- * http://github.com/#{github_username}/#{project_name}
3
+ * http://rubyforge.org/projects/ruby-mpfr/
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- ruby-mpfr is library to use MPFR which is a C library for
7
+ ruby-mpfr is library to use MPFR[http://www.mpfr.org/] which is a C library for
8
8
  multiple-precision floating-point computations.
9
9
 
10
10
  == FEATURES/PROBLEMS:
@@ -19,14 +19,17 @@ multiple-precision floating-point computations.
19
19
  b = MPFR.new('2.2')
20
20
  puts (a * b).to_strf("%.30Re")
21
21
 
22
- == REQUIREMENTS:
22
+ === REQUIREMENTS:
23
23
 
24
- * GMP
25
- * MPFR 2.4.0 or later
24
+ * MPFR[http://www.mpfr.org/] 2.4.1 or later
26
25
 
27
- == INSTALL:
26
+ For Ubuntu 9.10, we can install MPFR with the following command.
27
+ $ sudo apt-get install libmpfr-dev
28
28
 
29
- * sudo gem install ruby-mpfr
29
+ == INSTALL:
30
+ The package of rubygems of ruby-mpfr is provided.
31
+
32
+ $ sudo gem install ruby-mpfr
30
33
 
31
34
  == LICENSE:
32
35
 
@@ -45,4 +48,3 @@ details.
45
48
 
46
49
  You should have received a copy of the GNU General Public License along with
47
50
  this program. If not, see <http://www.gnu.org/licenses/>.
48
-
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  gem 'hoe', '>= 2.1.0'
3
3
  require 'hoe'
4
4
  require 'fileutils'
5
- require './lib/ruby-mpfr'
5
+ require './lib/mpfr/version.rb'
6
6
 
7
7
  Hoe.plugin :newgem
8
8
  # Hoe.plugin :website
@@ -15,10 +15,11 @@ $hoe = Hoe.spec 'ruby-mpfr' do
15
15
  self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
16
  self.rubyforge_name = self.name # TODO this is default value
17
17
  # self.extra_deps = [['activesupport','>= 2.0.2']]
18
- self.spec_extras[:extensions] = "ext/extconf.rb"
18
+ self.spec_extras[:extensions] = ["ext/mpfr/extconf.rb", "ext/mpfr_matrix/mpfr/extconf.rb"]
19
+ self.extra_rdoc_files << 'README.rdoc'
19
20
  end
20
21
 
21
- require 'newgem/tasks'
22
+ # require 'newgem/tasks'
22
23
  Dir['tasks/**/*.rake'].each { |t| load t }
23
24
 
24
25
  # TODO - want other tests/tasks run by default? Add them to the list
@@ -1,5 +1,9 @@
1
1
  require 'mkmf'
2
2
 
3
+ $CFLAGS += " -Wall"
4
+
5
+ dir_config("mpfr")
6
+ dir_config("gmp")
3
7
  if have_header('mpfr.h') && have_library('mpfr') && have_header('gmp.h') && have_library('gmp')
4
8
  create_makefile("mpfr")
5
9
  end