$howmany = !empty(field_get_items($entity_type, $entity, 'field_how_many') !== FALSE) ? array_pop(array_pop(field_get_items($entity_type, $entity, 'field_how_many'))) : 1;
$price1 = !empty(field_get_items($entity_type, $entity, 'field_reg_price1') !== FALSE) ? array_pop(array_pop(field_get_items($entity_type, $entity, 'field_reg_price1'))) : 1;
$price2 = !empty(field_get_items($entity_type, $entity, 'field_sale_price2') !== FALSE) ? array_pop(array_pop(field_get_items($entity_type, $entity, 'field_sale_price2'))) : 1;
$entity_field[0]['value'] = $howmany*$price1*$price2;
Also check if checks inIf this format worksstill does not work, Please try to inspect the structure of the stuff returned by field_get_items(). I am pretty sure the issue lies in returning a null from the fist array_pop.
In order to inspect the structure, add these lines to your compute code after enabling and installing devel module: != FALSE
dpm(field_get_items($entity_type, $entity, 'field_how_many')); dpm(field_get_items($entity_type, $entity, 'field_reg_price1')); dpm(field_get_items($entity_type, $entity, 'field_sale_price2')));