ext/mpfr/ruby_mpfr.c in ruby-mpfr-0.0.6 vs ext/mpfr/ruby_mpfr.c in ruby-mpfr-0.0.7
- old
+ new
@@ -53,11 +53,11 @@
}
/* min is a minimum number of arguments. */
/* max is a maximum number of arguments. */
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)
+ int argc, VALUE *argv)
{
if(argc >= min && argc <= max){
if(argc >= max - 1){
*rnd = r_mpfr_rnd_from_value(argv[max - 2]);
}else{
@@ -1628,11 +1628,11 @@
/*
Ruby MPFR saves the returned value of Special Functions (log, sin, cos, etc)
in MPFR library to class variable of class MPFR.
This method returns that class variable meaning the returned value of Special Functions in MPFR library.
See the MPFR reference for the kind of Special Functions and the meaning of the returned value of Special Functions.
- */
+*/
static VALUE r_mpfr_get_special_func_state(VALUE self)
{
return rb_cv_get(r_mpfr_class, SPECIAL_FUNC_STATE);
}
@@ -2758,13 +2758,13 @@
If it is not MPFR instance, it is converted to MPFR instance in this method.
And all methods have two optional arguments rnd and prec.
That is, You may call MPFR::Math.some_method(some_required_args, rnd, prec) and
last two arguments rnd and prec could be omitted.
The methods collected in this module works as the following imitational C code.
- mpfr_t returned_val;
- mpfr_init2(returned_val, prec);
- mpfr_some_func(returned_val, p1, ..., pn, rnd);
- return returned_val;
+ mpfr_t returned_val;
+ mpfr_init2(returned_val, prec);
+ mpfr_some_func(returned_val, p1, ..., pn, rnd);
+ return returned_val;
The returned value of mpfr_some_func is saved and if you want to get this value
then you may use MPFR.get_special_func_state.
*/
r_mpfr_math = rb_define_module_under(r_mpfr_class, "Math");