+ member = interaction_get_member (var, i);
+
+ if (var_is_value_missing (member, vals[i], MV_ANY))
+ {
+ value_set_missing (&result->val, MAX_SHORT_STRING);
+ result->f = SYSMIS;
+ break;
+ }
+ else
+ {
+ if (var_is_alpha (var->members[i]))
+ {
+ int w = var_get_width (var->members[i]);
+ value_resize (result, val_width, val_width + w);
+ u8_strncat (val, value_str (vals[i], w), w);
+ val = value_str_rw (&result->val, val_width);
+ }
+ else if (var_is_numeric (var->members[i]))
+ {
+ result->f *= vals[i]->f;
+ }
+ }
+ }
+ if (interaction_get_n_alpha (var) == 0)
+ {
+ /*
+ If there are no categorical variables, then the
+ interaction consists of only numeric data. In this case,
+ code that uses this interaction_value will see the union
+ member as the numeric value. If we were to store that
+ numeric value in result->f as well, the calling code may
+ inadvertently square this value by multiplying by
+ result->val->f. Such multiplication would be correct for an
+ interaction consisting of both categorical and numeric
+ data, but a mistake for purely numerical interactions. To
+ avoid the error, we set result->f to 1.0 for numeric
+ interactions.
+ */
+ result->val.f = result->f;
+ result->f = 1.0;