gmp 0.4.7-x86-mingw32 → 0.5.3-x86-mingw32

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 (56) hide show
  1. data/CHANGELOG +31 -0
  2. data/README.rdoc +16 -8
  3. data/benchmark/gexpr +0 -0
  4. data/benchmark/multiply +1 -1
  5. data/benchmark/multiply.gc +57 -0
  6. data/benchmark/pi +126 -0
  7. data/benchmark/srb.sh +21 -0
  8. data/ext/extconf.rb +3 -0
  9. data/ext/gmp.c +16 -7
  10. data/ext/gmp.so +0 -0
  11. data/ext/gmpbench_timing.c +1 -1
  12. data/ext/gmpf.c +445 -104
  13. data/ext/gmpq.c +25 -17
  14. data/ext/gmpz.c +232 -120
  15. data/ext/libmpfr-4.dll +0 -0
  16. data/ext/mprnd.c +23 -5
  17. data/ext/ruby_gmp.h +75 -9
  18. data/lib/gmp.rb +9 -0
  19. data/manual.pdf +0 -0
  20. data/manual.tex +494 -60
  21. data/test/README +1 -0
  22. data/test/mpfr_tcbrt.rb +95 -0
  23. data/test/mpfr_tisnan.rb +70 -0
  24. data/test/mpfr_trec_sqrt.rb +62 -0
  25. data/test/mpfr_tsqrt.rb +142 -6
  26. data/test/tc_cmp.rb +4 -4
  27. data/test/tc_constants.rb +10 -0
  28. data/test/tc_division.rb +13 -2
  29. data/test/tc_f_arithmetics_coersion.rb +2 -2
  30. data/test/tc_f_precision.rb +4 -3
  31. data/test/tc_fib_fac_nextprime.rb +2 -2
  32. data/test/tc_floor_ceil_truncate.rb +2 -2
  33. data/test/tc_hashes.rb +0 -2
  34. data/test/tc_logical_roots.rb +1 -3
  35. data/test/tc_mpfr_constants.rb +11 -0
  36. data/test/tc_mpfr_functions.rb +22 -9
  37. data/test/tc_mpfr_random.rb +1 -3
  38. data/test/tc_mpfr_rounding.rb +10 -7
  39. data/test/tc_q.rb +1 -3
  40. data/test/tc_q_basic.rb +3 -5
  41. data/test/tc_random.rb +1 -3
  42. data/test/tc_sgn_neg_abs.rb +1 -3
  43. data/test/tc_swap.rb +1 -3
  44. data/test/tc_z.rb +3 -3
  45. data/test/tc_z_addmul.rb +92 -0
  46. data/test/tc_z_basic.rb +6 -8
  47. data/test/tc_z_exponentiation.rb +1 -3
  48. data/test/tc_z_gcd_lcm_invert.rb +1 -3
  49. data/test/tc_z_jac_leg_rem.rb +1 -3
  50. data/test/tc_z_logic.rb +2 -2
  51. data/test/tc_z_shifts_last_bits.rb +2 -2
  52. data/test/tc_z_to_d_to_i.rb +2 -2
  53. data/test/test_helper.rb +1 -1
  54. data/test/test_unit/assertions.rb +31 -0
  55. data/test/unit_tests.rb +33 -27
  56. metadata +35 -8
@@ -1,5 +1,3 @@
1
- require 'test_helper'
2
-
3
1
  class TC_Z_Exponentiation < Test::Unit::TestCase
4
2
  def setup
5
3
  @a = GMP::Z.new(100)
@@ -19,4 +17,4 @@ class TC_Z_Exponentiation < Test::Unit::TestCase
19
17
  assert_equal(GMP::Z(0), @a.powmod(@b,256), "(a : GMP::Z).powmod((b : GMP::Z), (c : Fixnum)) should work correctly")
20
18
  assert_equal(GMP::Z(0), @a.powmod(@b,@c), "(a : GMP::Z).powmod((b : GMP::Z), (c : GMP::Z)) should work correctly")
21
19
  end
22
- end
20
+ end
@@ -1,5 +1,3 @@
1
- require 'test_helper'
2
-
3
1
  class TC_Z_GCD_LCM_Invert < Test::Unit::TestCase
4
2
  def setup
5
3
  @a = GMP::Z( 24) # 2^3 * 3
@@ -54,4 +52,4 @@ class TC_Z_GCD_LCM_Invert < Test::Unit::TestCase
54
52
  assert_equal(GMP::Z( 4), GMP::Z(14).invert(@e), "GMP::Z should invert correctly")
55
53
  assert_equal(GMP::Z( 3), GMP::Z(15).invert(@e), "GMP::Z should invert correctly")
56
54
  end
57
- end
55
+ end
@@ -1,5 +1,3 @@
1
- require 'test_helper'
2
-
3
1
  class TC_Z_Jacobi_Legendre_Remove < Test::Unit::TestCase
4
2
  def setup
5
3
  @one = GMP::Z(1)
@@ -70,4 +68,4 @@ class TC_Z_Jacobi_Legendre_Remove < Test::Unit::TestCase
70
68
  assert_equal(1, @forty_five.remove(@five)[1], "GMP::Z should remove(GMP::Z) correctly.")
71
69
  assert_equal(2, @forty_five.remove(@three)[1], "GMP::Z should remove(GMP::Z) correctly.")
72
70
  end
73
- end
71
+ end
data/test/tc_z_logic.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require './test_helper'
2
2
 
3
3
  class TC_Z_Logic < Test::Unit::TestCase
4
4
  def setup
@@ -51,4 +51,4 @@ class TC_Z_Logic < Test::Unit::TestCase
51
51
  assert_equal(a.scan1(0), 2, "GMP::Z#scan1 should scan for 1s")
52
52
 
53
53
  end
54
- end
54
+ end
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require './test_helper'
2
2
 
3
3
  class TC_shifts_last_bits < Test::Unit::TestCase
4
4
  def setup
@@ -19,4 +19,4 @@ class TC_shifts_last_bits < Test::Unit::TestCase
19
19
  #assert_equal(-4, @b.lastbits_sgn(5), "GMP::Z should lastbits_sgn correctly.")
20
20
  # a.tshr 5 ???
21
21
  end
22
- end
22
+ end
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require './test_helper'
2
2
 
3
3
  class TC_to_i_to_d < Test::Unit::TestCase
4
4
  def setup
@@ -21,4 +21,4 @@ class TC_to_i_to_d < Test::Unit::TestCase
21
21
  #assert_equal(@b.to_d.class, Float, "GMP::Z.to_d should be a Float.")
22
22
  assert_equal(@c.to_d.class, Float, "GMP::Q.to_d should be a Float.")
23
23
  end
24
- end
24
+ end
data/test/test_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'test/unit'
2
- require 'test_unit/assertions' # Monkey patch
2
+ require './test_unit/assertions' # Monkey patch
3
3
  require 'rbconfig'
4
4
 
5
5
  ENV['PATH'] = [File.expand_path(
@@ -0,0 +1,31 @@
1
+ module Test::Unit::Assertions
2
+ def assert_less_than(expected, actual, message=nil)
3
+ assert_true(actual < expected, message)
4
+ end
5
+ alias :assert_lt :assert_less_than
6
+
7
+ def assert_lte(expected, actual, message=nil)
8
+ assert_true(actual <= expected, message)
9
+ end
10
+
11
+ def assert_greater_than(expected, actual, message=nil)
12
+ assert_true(actual > expected, message)
13
+ end
14
+ alias :assert_gt :assert_greater_than
15
+
16
+ def assert_gte(expected, actual, message=nil)
17
+ assert_true(actual >= expected, message)
18
+ end
19
+
20
+ def assert_between(expected_low, expected_high, actual, message=nil)
21
+ assert_true(actual <= expected_high && actual >= expected_low, message)
22
+ end
23
+
24
+ def assert_true(actual, message=nil)
25
+ assert(actual, message)
26
+ end
27
+
28
+ def assert_false(actual, message=nil)
29
+ assert(!actual, message)
30
+ end
31
+ end
data/test/unit_tests.rb CHANGED
@@ -1,36 +1,42 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'test_helper'
3
+ require './test_helper'
4
4
 
5
- require 'tc_z'
6
- require 'tc_z_basic'
7
- require 'tc_z_logic'
8
- require 'tc_q'
9
- require 'tc_cmp'
10
- require 'tc_q_basic'
11
- require 'tc_z_exponentiation'
12
- require 'tc_zerodivisionexceptions'
13
- require 'tc_sgn_neg_abs'
14
- require 'tc_fib_fac_nextprime'
15
- require 'tc_swap'
16
- require 'tc_floor_ceil_truncate'
17
- require 'tc_z_to_d_to_i'
18
- require 'tc_z_shifts_last_bits'
19
- require 'tc_logical_roots'
20
- require 'tc_f_precision'
21
- require 'tc_f_arithmetics_coersion'
22
- require 'tc_division'
23
- require 'tc_z_jac_leg_rem'
24
- require 'tc_z_gcd_lcm_invert'
25
- require 'tc_random'
26
- require 'tc_hashes'
5
+ require './tc_constants'
6
+ require './tc_z'
7
+ require './tc_z_basic'
8
+ require './tc_z_addmul'
9
+ require './tc_z_logic'
10
+ require './tc_q'
11
+ require './tc_cmp'
12
+ require './tc_q_basic'
13
+ require './tc_z_exponentiation'
14
+ require './tc_zerodivisionexceptions'
15
+ require './tc_sgn_neg_abs'
16
+ require './tc_fib_fac_nextprime'
17
+ require './tc_swap'
18
+ require './tc_floor_ceil_truncate'
19
+ require './tc_z_to_d_to_i'
20
+ require './tc_z_shifts_last_bits'
21
+ require './tc_logical_roots'
22
+ require './tc_f_precision'
23
+ require './tc_f_arithmetics_coersion'
24
+ require './tc_division'
25
+ require './tc_z_jac_leg_rem'
26
+ require './tc_z_gcd_lcm_invert'
27
+ require './tc_random'
28
+ require './tc_hashes'
27
29
 
28
30
  begin
29
31
  GMP::MPFR_VERSION
30
- require 'tc_mpfr_random'
31
- require 'tc_mpfr_functions'
32
- require 'tc_mpfr_rounding'
33
- require 'mpfr_tsqrt'
32
+ require './tc_mpfr_constants'
33
+ require './tc_mpfr_random'
34
+ require './tc_mpfr_functions'
35
+ require './tc_mpfr_rounding'
36
+ require './mpfr_tcbrt'
37
+ require './mpfr_tisnan'
38
+ require './mpfr_trec_sqrt'
39
+ require './mpfr_tsqrt'
34
40
  rescue
35
41
 
36
42
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ hash: 13
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 5
9
+ - 3
10
+ version: 0.5.3
5
11
  platform: x86-mingw32
6
12
  authors:
7
13
  - Tomasz Wegrzanowski
@@ -10,7 +16,7 @@ autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2010-03-25 00:00:00 -07:00
19
+ date: 2010-09-20 00:00:00 -07:00
14
20
  default_executable:
15
21
  dependencies: []
16
22
 
@@ -20,8 +26,8 @@ email:
20
26
  - sam.rawlins@gmail.com
21
27
  executables: []
22
28
 
23
- extensions:
24
- - ext/extconf.rb
29
+ extensions: []
30
+
25
31
  extra_rdoc_files: []
26
32
 
27
33
  files:
@@ -39,11 +45,17 @@ files:
39
45
  - ext/ruby_gmp.h
40
46
  - ext/takeover.h
41
47
  - ext/extconf.rb
48
+ - lib/gmp.rb
42
49
  - ext/libgmp-10.dll
43
50
  - ext/libmpfr-1.dll
51
+ - ext/libmpfr-4.dll
44
52
  - ext/gmp.so
53
+ - test/mpfr_tcbrt.rb
54
+ - test/mpfr_tisnan.rb
55
+ - test/mpfr_trec_sqrt.rb
45
56
  - test/mpfr_tsqrt.rb
46
57
  - test/tc_cmp.rb
58
+ - test/tc_constants.rb
47
59
  - test/tc_division.rb
48
60
  - test/tc_fib_fac_nextprime.rb
49
61
  - test/tc_floor_ceil_truncate.rb
@@ -51,6 +63,7 @@ files:
51
63
  - test/tc_f_precision.rb
52
64
  - test/tc_hashes.rb
53
65
  - test/tc_logical_roots.rb
66
+ - test/tc_mpfr_constants.rb
54
67
  - test/tc_mpfr_functions.rb
55
68
  - test/tc_mpfr_random.rb
56
69
  - test/tc_mpfr_rounding.rb
@@ -61,6 +74,7 @@ files:
61
74
  - test/tc_swap.rb
62
75
  - test/tc_z.rb
63
76
  - test/tc_zerodivisionexceptions.rb
77
+ - test/tc_z_addmul.rb
64
78
  - test/tc_z_basic.rb
65
79
  - test/tc_z_exponentiation.rb
66
80
  - test/tc_z_gcd_lcm_invert.rb
@@ -77,16 +91,21 @@ files:
77
91
  - test/test_helper.rb
78
92
  - test/unit_tests.rb
79
93
  - test/README
94
+ - test/test_unit/assertions.rb
80
95
  - benchmark/COPYING
81
96
  - benchmark/divide
82
97
  - benchmark/gcd
98
+ - benchmark/gexpr
83
99
  - benchmark/gexpr.c
84
100
  - benchmark/gexpr.exe
85
101
  - benchmark/multiply
102
+ - benchmark/multiply.gc
103
+ - benchmark/pi
86
104
  - benchmark/README
87
105
  - benchmark/rsa
88
106
  - benchmark/runbench
89
107
  - benchmark/runbench.rb
108
+ - benchmark/srb.sh
90
109
  - benchmark/version
91
110
  - CHANGELOG
92
111
  - INSTALL
@@ -103,21 +122,29 @@ rdoc_options: []
103
122
  require_paths:
104
123
  - lib
105
124
  required_ruby_version: !ruby/object:Gem::Requirement
125
+ none: false
106
126
  requirements:
107
127
  - - ">="
108
128
  - !ruby/object:Gem::Version
109
- version: 1.8.1
110
- version:
129
+ hash: 59
130
+ segments:
131
+ - 1
132
+ - 8
133
+ - 6
134
+ version: 1.8.6
111
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
+ none: false
112
137
  requirements:
113
138
  - - ">="
114
139
  - !ruby/object:Gem::Version
140
+ hash: 3
141
+ segments:
142
+ - 0
115
143
  version: "0"
116
- version:
117
144
  requirements:
118
145
  - GMP compiled and working properly.
119
146
  rubyforge_project:
120
- rubygems_version: 1.3.5
147
+ rubygems_version: 1.3.7
121
148
  signing_key:
122
149
  specification_version: 3
123
150
  summary: Provides Ruby bindings to the GMP library.