ruby-mpfr 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/History.txt +4 -0
- data/ext/mpfr/ruby_mpfr.c +6 -6
- data/ext/mpfr_matrix/mpfr/ruby_mpfr_matrix.c +4 -4
- data/lib/mpfr/version.rb +1 -1
- metadata +23 -3
data/History.txt
CHANGED
data/ext/mpfr/ruby_mpfr.c
CHANGED
@@ -55,7 +55,7 @@ mp_rnd_t r_mpfr_prec_from_optional_argument(int min, int max, int argc, VALUE *a
|
|
55
55
|
/* min is a minimum number of arguments. */
|
56
56
|
/* max is a maximum number of arguments. */
|
57
57
|
void r_mpfr_get_rnd_prec_from_optional_arguments(mp_rnd_t *rnd, mp_prec_t *prec, int min, int max,
|
58
|
-
|
58
|
+
int argc, VALUE *argv)
|
59
59
|
{
|
60
60
|
if(argc >= min && argc <= max){
|
61
61
|
if(argc >= max - 1){
|
@@ -1630,7 +1630,7 @@ static VALUE r_mpfr_prec_round2(int argc, VALUE *argv, VALUE self)
|
|
1630
1630
|
in MPFR library to class variable of class MPFR.
|
1631
1631
|
This method returns that class variable meaning the returned value of Special Functions in MPFR library.
|
1632
1632
|
See the MPFR reference for the kind of Special Functions and the meaning of the returned value of Special Functions.
|
1633
|
-
|
1633
|
+
*/
|
1634
1634
|
static VALUE r_mpfr_get_special_func_state(VALUE self)
|
1635
1635
|
{
|
1636
1636
|
return rb_cv_get(r_mpfr_class, SPECIAL_FUNC_STATE);
|
@@ -2760,10 +2760,10 @@ void Init_mpfr()
|
|
2760
2760
|
That is, You may call MPFR::Math.some_method(some_required_args, rnd, prec) and
|
2761
2761
|
last two arguments rnd and prec could be omitted.
|
2762
2762
|
The methods collected in this module works as the following imitational C code.
|
2763
|
-
|
2764
|
-
|
2765
|
-
|
2766
|
-
|
2763
|
+
mpfr_t returned_val;
|
2764
|
+
mpfr_init2(returned_val, prec);
|
2765
|
+
mpfr_some_func(returned_val, p1, ..., pn, rnd);
|
2766
|
+
return returned_val;
|
2767
2767
|
The returned value of mpfr_some_func is saved and if you want to get this value
|
2768
2768
|
then you may use MPFR.get_special_func_state.
|
2769
2769
|
*/
|
@@ -101,7 +101,7 @@ static VALUE r_mpfr_matrix_global_new(int argc, VALUE *argv, VALUE self)
|
|
101
101
|
/*
|
102
102
|
Initialization function for MPFR::Matrix.
|
103
103
|
If this method gets one argument which is two dimensional Array,
|
104
|
-
it returns MPFR::Matrix instance of which size is same as the array.
|
104
|
+
it returns MPFR::Matrix instance of which size is the same as the two dimensional array.
|
105
105
|
Getting two argument integers (i, j), it returns MPFR::Matrix instance of which
|
106
106
|
size is (i x j).
|
107
107
|
*/
|
@@ -160,7 +160,7 @@ static VALUE r_mpfr_square_matrix_global_new(int argc, VALUE arg)
|
|
160
160
|
{
|
161
161
|
MPFRMatrix *ptr;
|
162
162
|
VALUE val;
|
163
|
-
|
163
|
+
r_mpfr_make_square_matrix_struct(val, ptr);
|
164
164
|
r_mpfr_square_matrix_set_initial_value(ptr, arg);
|
165
165
|
return val;
|
166
166
|
}
|
@@ -222,7 +222,7 @@ static VALUE r_mpfr_col_vector_global_new(VALUE self, VALUE arg)
|
|
222
222
|
{
|
223
223
|
MPFRMatrix *ptr;
|
224
224
|
VALUE val;
|
225
|
-
|
225
|
+
r_mpfr_make_col_vector_struct(val, ptr);
|
226
226
|
r_mpfr_col_vector_set_initial_value(ptr, arg);
|
227
227
|
return val;
|
228
228
|
}
|
@@ -273,7 +273,7 @@ static VALUE r_mpfr_row_vector_global_new(int argc, VALUE arg)
|
|
273
273
|
{
|
274
274
|
MPFRMatrix *ptr;
|
275
275
|
VALUE val;
|
276
|
-
|
276
|
+
r_mpfr_make_row_struct(val, ptr);
|
277
277
|
r_mpfr_row_vector_set_initial_value(ptr, arg);
|
278
278
|
return val;
|
279
279
|
}
|
data/lib/mpfr/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RUBY_MPFR_VERSION = '0.0.
|
1
|
+
RUBY_MPFR_VERSION = '0.0.7'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-mpfr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takayuki YAMAGUCHI
|
@@ -9,9 +9,29 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-21 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rubyforge
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.0.3
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: gemcutter
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.3.0
|
34
|
+
version:
|
15
35
|
- !ruby/object:Gem::Dependency
|
16
36
|
name: hoe
|
17
37
|
type: :development
|
@@ -20,7 +40,7 @@ dependencies:
|
|
20
40
|
requirements:
|
21
41
|
- - ">="
|
22
42
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.
|
43
|
+
version: 2.5.0
|
24
44
|
version:
|
25
45
|
description: |-
|
26
46
|
ruby-mpfr is a library to use MPFR[http://www.mpfr.org/] which is a C library for
|