If the integer will fit into a Fixnum, you can use the macro INT2FIX to return a Fixnum value for the integer returned by dsvd(). Otherwise you have to use INT2NUM, which has a function-call overhead (it calls rb_int2inum). Look for these macros in ruby.h for more details.
Edited: Your comment indicates you need a lot more help. You want something like this. I have not compiled this, and it has no checking for argument sanity, but it should get you going). The signature of your method looks like the values passed in the arrays a and v might be changed, and this code does not copy back any changes to the Ruby versions (use rb_ary_store to assign elements).
#include <ruby.h>
#include <ruby/intern.h>
static VALUE rb_mSvd;
static VALUE
rb_svd(VALUE self, VALUE a_array, VALUE m_v, VALUE n_v, VALUE w_v, VALUE v_array)
{
/* Note that there is no checking here for correct types or sane values! */
long a_len = RARRAY_LEN(a_array); /* get the length of first (array) argument */
float* a = (float*)malloc(sizeof(float)*a_len); /* make space for the copies */
int m = NUM2INT(m_v);
int n = NUM2INT(n_v);
float w = NUM2DBL(w_v);
long v_len = RARRAY_LEN(v_array);
float* v = (float*)malloc(sizeof(float)*v_len);
int result;
for (int i = 0; i < a_len; i++)
a[i] = NUM2DBL(rb_ary_entry(a_array, i));
for (int i = 0; i < v_len; i++)
v[i] = NUM2DBL(rb_ary_entry(v_array, i));
result = dsvd(&a, m, n, w, &v);
free(a);
free(v);
return INT2NUM(result);
}
void Init_svd()
{
rb_mSvd = rb_define_module("Svd");
rb_define_method(rb_mSvd, "svd", rb_svd, 5);
}