def _multiply(factors):
    """
    Generate string multiplying a list of numbers or strings.  If a
    factor is zero, the whole product is zero. Any factors equal to
    one are ignored.
    """
    cpp_str = format['str']
    non_zero_factors = []
    for f in factors:
        if isinstance(f, (int, float)):
            if abs(f) < format['epsilon']:
                return cpp_str(0)
            if abs(f - 1.0) < format['epsilon']:
                continue
        f = cpp_str(f)
        if f == '0':
            return cpp_str(0)
        if f == '1':
            continue
        if '+' in f or '-' in f:
            f = '(%s)' % f
        non_zero_factors += [f]
    if len(non_zero_factors) == 0:
        return cpp_str(1.0)
    return '*'.join(non_zero_factors)
