ext/vector_complex.c in gsl-1.14.7 vs ext/vector_complex.c in gsl-1.15.3

- old
+ new

@@ -1984,11 +1984,14 @@ free((gsl_vector_complex**) vp); return ary; } -static int gsl_vector_complex_equal(const gsl_vector_complex *v1, +// Starting with version 1.15, GSL provides a gsl_vector_complex_equal +// function, but it only determines absolute equality (i.e. is has no epsilon +// argument). +static int gsl_vector_complex_equal_eps(const gsl_vector_complex *v1, const gsl_vector_complex *v2, double eps) { gsl_complex z1, z2; size_t i; if (v1->size != v2->size) return 0; @@ -2017,10 +2020,10 @@ rb_raise(rb_eArgError, "Wrong number of arguments (%d for 1 or 2)\n", argc); } Data_Get_Struct(obj, gsl_vector_complex, v1); CHECK_VECTOR_COMPLEX(argv[0]); Data_Get_Struct(argv[0], gsl_vector_complex, v2); - ret = gsl_vector_complex_equal(v1, v2, eps); + ret = gsl_vector_complex_equal_eps(v1, v2, eps); if (ret == 1) return Qtrue; else return Qfalse; } static VALUE rb_gsl_vector_complex_not_equal(int argc, VALUE *argv, VALUE obj)