Change field type with hook_update_n for a module
You just need to add precision and scale to the field config settings:

// API way.
$field = field_info_field('field_rin');
$field['settings']['precision'] = 10;
$field['settings']['scale'] = 2;
field_update_field($field);

// Raw way (shorthand, you'll want to add error checking).
$data = unserialize(db_query("SELECT data FROM {field_config} WHERE field_name = 'field_rin'")-&gt;fetchField());
$data['settings']['precision'] = 10;
$data['settings']['scale'] = 2;

db_update('field_config')
  -&gt;fields(array('data' =&gt; serialize($data)))
  -&gt;condition('field_name', 'field_rin')
  -&gt;execute();