ruby-mpc 0.0.2 → 0.0.3

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/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.0.3 2009-12-18
2
+ * 1 major enhancement:
3
+ * Add methods MPC.
4
+ * 1 minor enhancement:
5
+ * Maintenance of docments.
6
+
1
7
  === 0.0.2 2009-12-15
2
8
 
3
9
  * 1 major enhancement:
data/README.rdoc CHANGED
@@ -1,6 +1,7 @@
1
1
  = ruby-mpc
2
2
 
3
- * http://github.com/#{github_username}/#{project_name}
3
+ * http://rubyforge.org/projects/ruby-mpfr/
4
+ * http://gemcutter.org/gems/ruby-mpc/
4
5
 
5
6
  == DESCRIPTION:
6
7
 
@@ -14,35 +15,30 @@ FIX (describe your package)
14
15
 
15
16
  FIX (code sample of usage)
16
17
 
17
- == REQUIREMENTS:
18
+ == Requirements:
18
19
 
19
- * FIX (list of requirements)
20
+ * MPFR
21
+ * MPC
22
+ * ruby-mpfr
20
23
 
21
- == INSTALL:
24
+ == Install:
22
25
 
23
- * FIX (sudo gem install, anything else)
26
+ $ sudo gem install ruby-mpc
24
27
 
25
- == LICENSE:
28
+ == License:
26
29
 
27
- (The MIT License)
30
+ ruby-mpc
31
+ Copyright (C) 2009 Takayuki YAMAGUCHI
28
32
 
29
- Copyright (c) 2009 FIXME full name
33
+ This program is free software; you can redistribute it and/or modify it under
34
+ the terms of the GNU Lesser General Public License as published by the Free
35
+ Software Foundation; either version 3 of the License, or (at your option) any
36
+ later version.
30
37
 
31
- Permission is hereby granted, free of charge, to any person obtaining
32
- a copy of this software and associated documentation files (the
33
- 'Software'), to deal in the Software without restriction, including
34
- without limitation the rights to use, copy, modify, merge, publish,
35
- distribute, sublicense, and/or sell copies of the Software, and to
36
- permit persons to whom the Software is furnished to do so, subject to
37
- the following conditions:
38
+ This program is distributed in the hope that it will be useful, but WITHOUT
39
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
41
+ details.
38
42
 
39
- The above copyright notice and this permission notice shall be
40
- included in all copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43
+ You should have received a copy of the GNU General Public License along with
44
+ this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile CHANGED
@@ -14,8 +14,9 @@ $hoe = Hoe.spec 'ruby-mpc' do
14
14
  self.developer 'Takayuki YAMAGUCHI', 'd@ytak.info'
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
- # self.extra_deps = [['activesupport','>= 2.0.2']]
17
+ self.extra_deps = [['ruby-mpfr','>= 0.0.4']]
18
18
  self.spec_extras[:extensions] = "ext/mpc/extconf.rb"
19
+ self.extra_rdoc_files << 'README.rdoc'
19
20
  end
20
21
 
21
22
  require 'newgem/tasks'
data/ext/mpc/ruby_mpc.c CHANGED
@@ -120,6 +120,7 @@ void r_mpc_free(void *ptr){
120
120
  free(ptr);
121
121
  }
122
122
 
123
+ /* Allocation function. */
123
124
  static VALUE r_mpc_alloc(VALUE self)
124
125
  {
125
126
  MPC *ptr;
@@ -169,16 +170,8 @@ static void r_mpc_set_from_one_object(MPC *ptr, VALUE obj, mpc_rnd_t rnd)
169
170
  }
170
171
  }
171
172
 
172
- /* Arguments may be the following types by number. */
173
- /* 0. none */
174
- /* 1. MPC or array having two elements */
175
- /* 2. real part and imaginary part*/
176
- /* 3. real part, imaginary part, and rounding mode */
177
- /* 4. real part, imaginary part, rounding mode and precision */
178
- static VALUE r_mpc_initialize(int argc, VALUE *argv, VALUE self)
173
+ static void r_mpc_set_initial_value(MPC *ptr, int argc, VALUE *argv)
179
174
  {
180
- MPC *ptr;
181
- r_mpc_get_struct(ptr, self);
182
175
  switch(argc){
183
176
  case 0:
184
177
  mpc_init2(ptr, mpfr_get_default_prec());
@@ -202,10 +195,37 @@ static VALUE r_mpc_initialize(int argc, VALUE *argv, VALUE self)
202
195
  default:
203
196
  rb_raise(rb_eArgError, "Invalid number of arguments.");
204
197
  break;
205
- }
198
+ }
199
+ }
200
+
201
+ /* Return new MPC instance. The same arguments as MPC.new is acceptable. */
202
+ static VALUE r_mpc_global_new(int argc, VALUE *argv, VALUE self)
203
+ {
204
+ MPC *ptr;
205
+ VALUE val;
206
+ r_mpc_make_struct(val, ptr);
207
+ r_mpc_set_initial_value(ptr, argc, argv);
208
+ return val;
209
+ }
210
+
211
+
212
+ /*
213
+ Arguments may be the following types by number.
214
+ 0. none
215
+ 1. MPC or array having two elements
216
+ 2. real part and imaginary part
217
+ 3. real part, imaginary part, and rounding mode
218
+ 4. real part, imaginary part, rounding mode and precision
219
+ */
220
+ static VALUE r_mpc_initialize(int argc, VALUE *argv, VALUE self)
221
+ {
222
+ MPC *ptr;
223
+ r_mpc_get_struct(ptr, self);
224
+ r_mpc_set_initial_value(ptr, argc, argv);
206
225
  return Qtrue;
207
226
  }
208
227
 
228
+ /* initialize_copy */
209
229
  static VALUE r_mpc_initialize_copy(VALUE self, VALUE other)
210
230
  {
211
231
  MPC *ptr_self, *ptr_other;
@@ -229,6 +249,7 @@ static VALUE r_mpc_coerce(VALUE self, VALUE other)
229
249
 
230
250
  /* String */
231
251
 
252
+ /* inspect */
232
253
  static VALUE r_mpc_inspect(VALUE self)
233
254
  {
234
255
  MPC *ptr_s;
@@ -300,6 +321,8 @@ static VALUE r_mpc_proj (int argc, VALUE *argv, VALUE self)
300
321
  }
301
322
 
302
323
  /* Basic Arithmetic Functions */
324
+
325
+ /* Return self + p1. */
303
326
  static VALUE r_mpc_add(VALUE self, VALUE other)
304
327
  {
305
328
  MPC *ptr_self, *ptr_return;
@@ -322,6 +345,7 @@ static VALUE r_mpc_add(VALUE self, VALUE other)
322
345
  return val_ret;
323
346
  }
324
347
 
348
+ /* Return self / p1. */
325
349
  static VALUE r_mpc_sub(VALUE self, VALUE other)
326
350
  {
327
351
  MPC *ptr_self, *ptr_return;
@@ -345,6 +369,7 @@ static VALUE r_mpc_sub(VALUE self, VALUE other)
345
369
  return val_ret;
346
370
  }
347
371
 
372
+ /* Return self * p1. */
348
373
  static VALUE r_mpc_mul(VALUE self, VALUE other)
349
374
  {
350
375
  MPC *ptr_self, *ptr_return;
@@ -368,7 +393,7 @@ static VALUE r_mpc_mul(VALUE self, VALUE other)
368
393
  return val_ret;
369
394
  }
370
395
 
371
-
396
+ /* Return self / p1. */
372
397
  static VALUE r_mpc_div(VALUE self, VALUE other)
373
398
  {
374
399
  MPC *ptr_self, *ptr_return;
@@ -392,6 +417,7 @@ static VALUE r_mpc_div(VALUE self, VALUE other)
392
417
  return val_ret;
393
418
  }
394
419
 
420
+ /* Multiply self by _i_. */
395
421
  static VALUE r_mpc_mul_i (int argc, VALUE *argv, VALUE self)
396
422
  {
397
423
  mpc_rnd_t rnd;
@@ -405,6 +431,7 @@ static VALUE r_mpc_mul_i (int argc, VALUE *argv, VALUE self)
405
431
  return val_ret;
406
432
  }
407
433
 
434
+ /* Multiply self by -1. */
408
435
  static VALUE r_mpc_neg (int argc, VALUE *argv, VALUE self)
409
436
  {
410
437
  mpc_rnd_t rnd;
@@ -418,6 +445,7 @@ static VALUE r_mpc_neg (int argc, VALUE *argv, VALUE self)
418
445
  return val_ret;
419
446
  }
420
447
 
448
+ /* Return conjugate of self. */
421
449
  static VALUE r_mpc_conj (int argc, VALUE *argv, VALUE self)
422
450
  {
423
451
  mpc_rnd_t rnd;
@@ -431,6 +459,7 @@ static VALUE r_mpc_conj (int argc, VALUE *argv, VALUE self)
431
459
  return val_ret;
432
460
  }
433
461
 
462
+ /* Return absolute value. */
434
463
  static VALUE r_mpc_abs (int argc, VALUE *argv, VALUE self)
435
464
  {
436
465
  mpc_rnd_t rnd;
@@ -445,6 +474,7 @@ static VALUE r_mpc_abs (int argc, VALUE *argv, VALUE self)
445
474
  return val_ret;
446
475
  }
447
476
 
477
+ /* Return the norm (the square of absolute value). */
448
478
  static VALUE r_mpc_norm (int argc, VALUE *argv, VALUE self)
449
479
  {
450
480
  mpc_rnd_t rnd;
@@ -460,6 +490,8 @@ static VALUE r_mpc_norm (int argc, VALUE *argv, VALUE self)
460
490
  }
461
491
 
462
492
  /* module function */
493
+
494
+ /* Return self + p1. */
463
495
  static VALUE r_mpc_math_add(int argc, VALUE *argv, VALUE self)
464
496
  {
465
497
  mp_rnd_t rnd;
@@ -489,6 +521,7 @@ static VALUE r_mpc_math_add(int argc, VALUE *argv, VALUE self)
489
521
  return val_ret;
490
522
  }
491
523
 
524
+ /* Return self - p1. */
492
525
  static VALUE r_mpc_math_sub(int argc, VALUE *argv, VALUE self)
493
526
  {
494
527
  mp_rnd_t rnd;
@@ -523,6 +556,7 @@ static VALUE r_mpc_math_sub(int argc, VALUE *argv, VALUE self)
523
556
  return val_ret;
524
557
  }
525
558
 
559
+ /* Return self * p1. */
526
560
  static VALUE r_mpc_math_mul(int argc, VALUE *argv, VALUE self)
527
561
  {
528
562
  mp_rnd_t rnd;
@@ -552,6 +586,7 @@ static VALUE r_mpc_math_mul(int argc, VALUE *argv, VALUE self)
552
586
  return val_ret;
553
587
  }
554
588
 
589
+ /* Return self / p1. */
555
590
  static VALUE r_mpc_math_div(int argc, VALUE *argv, VALUE self)
556
591
  {
557
592
  mp_rnd_t rnd;
@@ -579,6 +614,8 @@ static VALUE r_mpc_math_div(int argc, VALUE *argv, VALUE self)
579
614
  return val_ret;
580
615
  }
581
616
 
617
+
618
+ /* mpc_mul_2exp(ret, p1, p2, rnd) */
582
619
  static VALUE r_mpc_math_mul_2exp (int argc, VALUE *argv, VALUE self)
583
620
  {
584
621
  mpc_rnd_t rnd;
@@ -593,6 +630,7 @@ static VALUE r_mpc_math_mul_2exp (int argc, VALUE *argv, VALUE self)
593
630
  return val_ret;
594
631
  }
595
632
 
633
+ /* mpc_div_2exp(ret, p1, p2, rnd) */
596
634
  static VALUE r_mpc_math_div_2exp (int argc, VALUE *argv, VALUE self)
597
635
  {
598
636
  mpc_rnd_t rnd;
@@ -608,6 +646,7 @@ static VALUE r_mpc_math_div_2exp (int argc, VALUE *argv, VALUE self)
608
646
  }
609
647
 
610
648
 
649
+ /* mpc_sqr(ret, p1, rnd) */
611
650
  static VALUE r_mpc_math_sqr (int argc, VALUE *argv, VALUE self)
612
651
  {
613
652
  mpc_rnd_t rnd;
@@ -622,6 +661,7 @@ static VALUE r_mpc_math_sqr (int argc, VALUE *argv, VALUE self)
622
661
  return val_ret;
623
662
  }
624
663
 
664
+ /* mpc_sqrt(ret, p1, rnd) */
625
665
  static VALUE r_mpc_math_sqrt (int argc, VALUE *argv, VALUE self)
626
666
  {
627
667
  mpc_rnd_t rnd;
@@ -636,6 +676,7 @@ static VALUE r_mpc_math_sqrt (int argc, VALUE *argv, VALUE self)
636
676
  return val_ret;
637
677
  }
638
678
 
679
+ /* mpc_pow(ret, p1, p2, rnd), mpc_pow_fr(ret, p1, p2, rnd) etc. */
639
680
  static VALUE r_mpc_math_pow(int argc, VALUE *argv, VALUE self)
640
681
  {
641
682
  mp_rnd_t rnd;
@@ -668,7 +709,7 @@ static VALUE r_mpc_math_pow(int argc, VALUE *argv, VALUE self)
668
709
  }
669
710
 
670
711
 
671
-
712
+ /* mpc_exp(ret, p1, rnd) */
672
713
  static VALUE r_mpc_math_exp (int argc, VALUE *argv, VALUE self)
673
714
  {
674
715
  mpc_rnd_t rnd;
@@ -683,6 +724,7 @@ static VALUE r_mpc_math_exp (int argc, VALUE *argv, VALUE self)
683
724
  return val_ret;
684
725
  }
685
726
 
727
+ /* mpc_log(ret, p1, rnd) */
686
728
  static VALUE r_mpc_math_log (int argc, VALUE *argv, VALUE self)
687
729
  {
688
730
  mpc_rnd_t rnd;
@@ -697,6 +739,7 @@ static VALUE r_mpc_math_log (int argc, VALUE *argv, VALUE self)
697
739
  return val_ret;
698
740
  }
699
741
 
742
+ /* mpc_sin(ret, p1, rnd) */
700
743
  static VALUE r_mpc_math_sin (int argc, VALUE *argv, VALUE self)
701
744
  {
702
745
  mpc_rnd_t rnd;
@@ -711,6 +754,7 @@ static VALUE r_mpc_math_sin (int argc, VALUE *argv, VALUE self)
711
754
  return val_ret;
712
755
  }
713
756
 
757
+ /* mpc_cos(ret, p1, rnd) */
714
758
  static VALUE r_mpc_math_cos (int argc, VALUE *argv, VALUE self)
715
759
  {
716
760
  mpc_rnd_t rnd;
@@ -725,6 +769,7 @@ static VALUE r_mpc_math_cos (int argc, VALUE *argv, VALUE self)
725
769
  return val_ret;
726
770
  }
727
771
 
772
+ /* mpc_tan(ret, p1, rnd) */
728
773
  static VALUE r_mpc_math_tan (int argc, VALUE *argv, VALUE self)
729
774
  {
730
775
  mpc_rnd_t rnd;
@@ -739,6 +784,7 @@ static VALUE r_mpc_math_tan (int argc, VALUE *argv, VALUE self)
739
784
  return val_ret;
740
785
  }
741
786
 
787
+ /* mpc_sinh(ret, p1, rnd) */
742
788
  static VALUE r_mpc_math_sinh (int argc, VALUE *argv, VALUE self)
743
789
  {
744
790
  mpc_rnd_t rnd;
@@ -753,6 +799,7 @@ static VALUE r_mpc_math_sinh (int argc, VALUE *argv, VALUE self)
753
799
  return val_ret;
754
800
  }
755
801
 
802
+ /* mpc_cosh(ret, p1, rnd) */
756
803
  static VALUE r_mpc_math_cosh (int argc, VALUE *argv, VALUE self)
757
804
  {
758
805
  mpc_rnd_t rnd;
@@ -767,6 +814,7 @@ static VALUE r_mpc_math_cosh (int argc, VALUE *argv, VALUE self)
767
814
  return val_ret;
768
815
  }
769
816
 
817
+ /* mpc_tanh(ret, p1, rnd) */
770
818
  static VALUE r_mpc_math_tanh (int argc, VALUE *argv, VALUE self)
771
819
  {
772
820
  mpc_rnd_t rnd;
@@ -781,6 +829,7 @@ static VALUE r_mpc_math_tanh (int argc, VALUE *argv, VALUE self)
781
829
  return val_ret;
782
830
  }
783
831
 
832
+ /* mpc_asin(ret, p1, rnd) */
784
833
  static VALUE r_mpc_math_asin (int argc, VALUE *argv, VALUE self)
785
834
  {
786
835
  mpc_rnd_t rnd;
@@ -795,6 +844,7 @@ static VALUE r_mpc_math_asin (int argc, VALUE *argv, VALUE self)
795
844
  return val_ret;
796
845
  }
797
846
 
847
+ /* mpc_acos(ret, p1, rnd) */
798
848
  static VALUE r_mpc_math_acos (int argc, VALUE *argv, VALUE self)
799
849
  {
800
850
  mpc_rnd_t rnd;
@@ -809,6 +859,7 @@ static VALUE r_mpc_math_acos (int argc, VALUE *argv, VALUE self)
809
859
  return val_ret;
810
860
  }
811
861
 
862
+ /* mpc_atan(ret, p1, rnd) */
812
863
  static VALUE r_mpc_math_atan (int argc, VALUE *argv, VALUE self)
813
864
  {
814
865
  mpc_rnd_t rnd;
@@ -823,6 +874,7 @@ static VALUE r_mpc_math_atan (int argc, VALUE *argv, VALUE self)
823
874
  return val_ret;
824
875
  }
825
876
 
877
+ /* mpc_asinh(ret, p1, rnd) */
826
878
  static VALUE r_mpc_math_asinh (int argc, VALUE *argv, VALUE self)
827
879
  {
828
880
  mpc_rnd_t rnd;
@@ -837,6 +889,7 @@ static VALUE r_mpc_math_asinh (int argc, VALUE *argv, VALUE self)
837
889
  return val_ret;
838
890
  }
839
891
 
892
+ /* mpc_acosh(ret, p1, rnd) */
840
893
  static VALUE r_mpc_math_acosh (int argc, VALUE *argv, VALUE self)
841
894
  {
842
895
  mpc_rnd_t rnd;
@@ -851,6 +904,7 @@ static VALUE r_mpc_math_acosh (int argc, VALUE *argv, VALUE self)
851
904
  return val_ret;
852
905
  }
853
906
 
907
+ /* mpc_atanh(ret, p1, rnd) */
854
908
  static VALUE r_mpc_math_atanh (int argc, VALUE *argv, VALUE self)
855
909
  {
856
910
  mpc_rnd_t rnd;
@@ -872,35 +926,53 @@ void Init_mpc(){
872
926
  rb_define_singleton_method(r_mpc_class, "set_default_rounding_mode", r_mpc_set_default_rounding_mode, 1);
873
927
  rb_define_singleton_method(r_mpc_class, "get_default_rounding_mode", r_mpc_get_default_rounding_mode, 0);
874
928
 
929
+ /* Integer which is macro MPC_RNDNN. */
875
930
  rb_define_const(r_mpc_class, "RNDNN", INT2NUM(MPC_RNDNN));
931
+ /* Integer which is macro MPC_RNDNZ. */
876
932
  rb_define_const(r_mpc_class, "RNDNZ", INT2NUM(MPC_RNDNZ));
933
+ /* Integer which is macro MPC_RNDNU. */
877
934
  rb_define_const(r_mpc_class, "RNDNU", INT2NUM(MPC_RNDNU));
935
+ /* Integer which is macro MPC_RNDND. */
878
936
  rb_define_const(r_mpc_class, "RNDND", INT2NUM(MPC_RNDND));
937
+ /* Integer which is macro MPC_RNDZN. */
879
938
  rb_define_const(r_mpc_class, "RNDZN", INT2NUM(MPC_RNDZN));
939
+ /* Integer which is macro MPC_RNDZZ. */
880
940
  rb_define_const(r_mpc_class, "RNDZZ", INT2NUM(MPC_RNDZZ));
941
+ /* Integer which is macro MPC_RNDZU. */
881
942
  rb_define_const(r_mpc_class, "RNDZU", INT2NUM(MPC_RNDZU));
943
+ /* Integer which is macro MPC_RNDZD. */
882
944
  rb_define_const(r_mpc_class, "RNDZD", INT2NUM(MPC_RNDZD));
945
+ /* Integer which is macro MPC_RNDUN */
883
946
  rb_define_const(r_mpc_class, "RNDUN", INT2NUM(MPC_RNDUN));
947
+ /* Integer which is macro MPC_RNDUZ. */
884
948
  rb_define_const(r_mpc_class, "RNDUZ", INT2NUM(MPC_RNDUZ));
949
+ /* Integer which is macro MPC_RNDUU. */
885
950
  rb_define_const(r_mpc_class, "RNDUU", INT2NUM(MPC_RNDUU));
951
+ /* Integer which is macro MPC_RNDUD. */
886
952
  rb_define_const(r_mpc_class, "RNDUD", INT2NUM(MPC_RNDUD));
953
+ /* Integer which is macro MPC_RNDDN. */
887
954
  rb_define_const(r_mpc_class, "RNDDN", INT2NUM(MPC_RNDDN));
955
+ /* Integer which is macro MPC_RNDDZ. */
888
956
  rb_define_const(r_mpc_class, "RNDDZ", INT2NUM(MPC_RNDDZ));
957
+ /* Integer which is macro MPC_RNDDU. */
889
958
  rb_define_const(r_mpc_class, "RNDDU", INT2NUM(MPC_RNDDU));
959
+ /* Integer which is macro MPC_RNDDD. */
890
960
  rb_define_const(r_mpc_class, "RNDDD", INT2NUM(MPC_RNDDD));
891
961
 
962
+ /* Integer which is macro MPC_VERSION_MAJOR. */
892
963
  rb_define_const(r_mpc_class, "VERSION_MAJOR", INT2NUM(MPC_VERSION_MAJOR));
964
+ /* Integer which is macro MPC_VERSION_MINOR. */
893
965
  rb_define_const(r_mpc_class, "VERSION_MINOR", INT2NUM(MPC_VERSION_MINOR));
966
+ /* Integer which is macro MPC_VERSION_PATCHLEVEL. */
894
967
  rb_define_const(r_mpc_class, "VERSION_PATCHLEVEL", INT2NUM(MPC_VERSION_PATCHLEVEL));
968
+ /* Stirng which is macro MPC_VERSION_STRING. */
895
969
  rb_define_const(r_mpc_class, "VERSION_STRING", rb_str_new2(MPC_VERSION_STRING));
896
970
 
897
971
 
898
-
899
972
  rb_define_singleton_method(r_mpc_class, "get_function_state", r_mpc_get_function_state, 0);
900
973
 
901
-
974
+ rb_define_global_function("MPC", r_mpc_global_new, -1);
902
975
  rb_define_alloc_func(r_mpc_class, r_mpc_alloc);
903
-
904
976
  rb_define_private_method(r_mpc_class, "initialize", r_mpc_initialize, -1);
905
977
  rb_define_private_method(r_mpc_class, "initialize_copy", r_mpc_initialize_copy, 1);
906
978
 
@@ -963,6 +1035,5 @@ void Init_mpc(){
963
1035
  __mpc_class__ = rb_eval_string("MPC");
964
1036
  __mpfr_class__ = rb_eval_string("MPFR");
965
1037
 
966
-
967
1038
  }
968
1039
 
data/lib/mpc/version.rb CHANGED
@@ -1,3 +1 @@
1
- module MPC
2
- VERSION = '0.0.2'
3
- end
1
+ RUBY_MPC_VERSION = '0.0.3'
data/ruby-mpc.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ruby-mpc}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Takayuki YAMAGUCHI"]
9
- s.date = %q{2009-12-17}
9
+ s.date = %q{2009-12-19}
10
10
  s.description = %q{FIX (describe your package)}
11
11
  s.email = ["d@ytak.info"]
12
12
  s.extensions = ["ext/mpc/extconf.rb"]
13
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt"]
13
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
14
14
  s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "ext/mpc/extconf.rb", "ext/mpc/ruby_mpc.c", "ext/mpc/ruby_mpc.h", "ext/mpc/ruby_mpfr.h", "lib/mpc/version.rb", "ruby-mpc.gemspec", "script/console", "script/destroy", "script/generate", "spec/mpc/arithmetic_op_spec.rb", "spec/mpc/const_spec.rb", "spec/mpc/functions_spec.rb", "spec/mpc/generate_complex_number.rb", "spec/mpc/spec_helper.rb", "spec/spec.opts", "tasks/extconf.rake"]
15
- s.homepage = %q{http://github.com/#{github_username}/#{project_name}}
15
+ s.homepage = %q{http://rubyforge.org/projects/ruby-mpfr/}
16
16
  s.post_install_message = %q{PostInstall.txt}
17
17
  s.rdoc_options = ["--main", "README.rdoc"]
18
18
  s.require_paths = ["lib", "ext"]
@@ -25,11 +25,14 @@ Gem::Specification.new do |s|
25
25
  s.specification_version = 3
26
26
 
27
27
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
+ s.add_runtime_dependency(%q<ruby-mpfr>, [">= 0.0.4"])
28
29
  s.add_development_dependency(%q<hoe>, [">= 2.4.0"])
29
30
  else
31
+ s.add_dependency(%q<ruby-mpfr>, [">= 0.0.4"])
30
32
  s.add_dependency(%q<hoe>, [">= 2.4.0"])
31
33
  end
32
34
  else
35
+ s.add_dependency(%q<ruby-mpfr>, [">= 0.0.4"])
33
36
  s.add_dependency(%q<hoe>, [">= 2.4.0"])
34
37
  end
35
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-mpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takayuki YAMAGUCHI
@@ -9,9 +9,19 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-17 00:00:00 +09:00
12
+ date: 2009-12-19 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ruby-mpfr
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.4
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: hoe
17
27
  type: :development
@@ -33,6 +43,7 @@ extra_rdoc_files:
33
43
  - History.txt
34
44
  - Manifest.txt
35
45
  - PostInstall.txt
46
+ - README.rdoc
36
47
  files:
37
48
  - History.txt
38
49
  - Manifest.txt
@@ -56,7 +67,7 @@ files:
56
67
  - spec/spec.opts
57
68
  - tasks/extconf.rake
58
69
  has_rdoc: true
59
- homepage: http://github.com/#{github_username}/#{project_name}
70
+ homepage: http://rubyforge.org/projects/ruby-mpfr/
60
71
  licenses: []
61
72
 
62
73
  post_install_message: PostInstall.txt