/* (non-Javadoc)
@see org.joml.Vector2ic#mul(org.joml.Vector2ic, org.joml.Vector2i)
497612
public Vector2i mul(Vector2ic v, Vector2i dest) {
        dest.x = x * v.x();
        dest.y = y * v.y();
        return dest;
    }
400074
func (v1 Vec4) Mul(c float64) Vec4 {
	return Vec4{v1[0] * c, v1[1] * c, v1[2] * c, v1[3] * c}
}
954431
public Vector3f mul(Vector3fc v, Vector3f dest) {
        dest.x = x * v.x();
        dest.y = y * v.y();
        dest.z = z * v.z();
        return dest;
    }
1198796
public static BigDecimal mul(String v1, String v2) {
		return mul(new BigDecimal(v1), new BigDecimal(v2));
	}
864679
void mul(int y, MutableBigInteger z) {
        if (y == 1) {
            z.copyValue(this);
            return;
        }

        if (y == 0) {
            z.clear();
            return;
        }

        // Perform the multiplication word by word
        long ylong = y & LONG_MASK;
        int[] zval = (z.value.length < intLen+1 ? new int[intLen + 1]
                                              : z.value);
        long carry = 0;
        for (int i = intLen-1; i >= 0; i--) {
            long product = ylong * (value[i+offset] & LONG_MASK) + carry;
            zval[i+1] = (int)product;
            carry = product >>> 32;
        }

        if (carry == 0) {
            z.offset = 1;
            z.intLen = intLen;
        } else {
            z.offset = 0;
            z.intLen = intLen + 1;
            zval[0] = (int)carry;
        }
        z.value = zval;
    }
1052954
@Override
    public double[] mult(double[] source, double[] target) {
        if (target == null || target.length < 3) {
            target = new double[3];
        }
        if (source == target) {
            throw new RuntimeException("The source and target vectors used in Matrix3D.mult() cannot be identical.");
        }
        if (target.length == 3) {
            target[0] = m00 * source[0] + m01 * source[1] + m02 * source[2] + m03;
            target[1] = m10 * source[0] + m11 * source[1] + m12 * source[2] + m13;
            target[2] = m20 * source[0] + m21 * source[1] + m22 * source[2] + m23;
            //double w = m30*source[0] + m31*source[1] + m32*source[2] + m33;
            //if (w != 0 && w != 1) {
            //  target[0] /= w; target[1] /= w; target[2] /= w;
            //}
        } else if (target.length > 3) {
            target[0] = m00 * source[0] + m01 * source[1] + m02 * source[2] + m03 * source[3];
            target[1] = m10 * source[0] + m11 * source[1] + m12 * source[2] + m13 * source[3];
            target[2] = m20 * source[0] + m21 * source[1] + m22 * source[2] + m23 * source[3];
            target[3] = m30 * source[0] + m31 * source[1] + m32 * source[2] + m33 * source[3];
        }
        return target;
    }
144577
private static final long10 mul(long10 xy, long10 x, long10 y) {
		/* sahn0:
		 * Using local variables to avoid class access.
		 * This seem to improve performance a bit...
		 */
		long
			x_0=x._0,x_1=x._1,x_2=x._2,x_3=x._3,x_4=x._4,
			x_5=x._5,x_6=x._6,x_7=x._7,x_8=x._8,x_9=x._9;
		long
			y_0=y._0,y_1=y._1,y_2=y._2,y_3=y._3,y_4=y._4,
			y_5=y._5,y_6=y._6,y_7=y._7,y_8=y._8,y_9=y._9;
		long t;
		t = (x_0*y_8) + (x_2*y_6) + (x_4*y_4) + (x_6*y_2) +
			(x_8*y_0) + 2 * ((x_1*y_7) + (x_3*y_5) +
					(x_5*y_3) + (x_7*y_1)) + 38 *
			(x_9*y_9);
		xy._8 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_9) + (x_1*y_8) + (x_2*y_7) +
			(x_3*y_6) + (x_4*y_5) + (x_5*y_4) +
			(x_6*y_3) + (x_7*y_2) + (x_8*y_1) +
			(x_9*y_0);
		xy._9 = (t & ((1 << 25) - 1));
		t = (x_0*y_0) + 19 * ((t >> 25) + (x_2*y_8) + (x_4*y_6)
				+ (x_6*y_4) + (x_8*y_2)) + 38 *
			((x_1*y_9) + (x_3*y_7) + (x_5*y_5) +
			 (x_7*y_3) + (x_9*y_1));
		xy._0 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_1) + (x_1*y_0) + 19 * ((x_2*y_9)
				+ (x_3*y_8) + (x_4*y_7) + (x_5*y_6) +
				(x_6*y_5) + (x_7*y_4) + (x_8*y_3) +
				(x_9*y_2));
		xy._1 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_2) + (x_2*y_0) + 19 * ((x_4*y_8)
				+ (x_6*y_6) + (x_8*y_4)) + 2 * (x_1*y_1)
				+ 38 * ((x_3*y_9) + (x_5*y_7) +
						(x_7*y_5) + (x_9*y_3));
		xy._2 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_3) + (x_1*y_2) + (x_2*y_1) +
			(x_3*y_0) + 19 * ((x_4*y_9) + (x_5*y_8) +
					(x_6*y_7) + (x_7*y_6) +
					(x_8*y_5) + (x_9*y_4));
		xy._3 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_4) + (x_2*y_2) + (x_4*y_0) + 19 *
			((x_6*y_8) + (x_8*y_6)) + 2 * ((x_1*y_3) +
								 (x_3*y_1)) + 38 *
			((x_5*y_9) + (x_7*y_7) + (x_9*y_5));
		xy._4 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_5) + (x_1*y_4) + (x_2*y_3) +
			(x_3*y_2) + (x_4*y_1) + (x_5*y_0) + 19 *
			((x_6*y_9) + (x_7*y_8) + (x_8*y_7) +
			 (x_9*y_6));
		xy._5 = (t & ((1 << 25) - 1));
		t = (t >> 25) + (x_0*y_6) + (x_2*y_4) + (x_4*y_2) +
			(x_6*y_0) + 19 * (x_8*y_8) + 2 * ((x_1*y_5) +
					(x_3*y_3) + (x_5*y_1)) + 38 *
			((x_7*y_9) + (x_9*y_7));
		xy._6 = (t & ((1 << 26) - 1));
		t = (t >> 26) + (x_0*y_7) + (x_1*y_6) + (x_2*y_5) +
			(x_3*y_4) + (x_4*y_3) + (x_5*y_2) +
			(x_6*y_1) + (x_7*y_0) + 19 * ((x_8*y_9) +
					(x_9*y_8));
		xy._7 = (t & ((1 << 25) - 1));
		t = (t >> 25) + xy._8;
		xy._8 = (t & ((1 << 26) - 1));
		xy._9 += (t >> 26);
		return xy;
	}
786228
func (v1 Vec2) Mul(c float32) Vec2 {
	return Vec2{v1[0] * c, v1[1] * c}
}
1234912
public void mutableMultiply(double c, double d)
    {
        double newR = this.real*c-this.imag*d;
        double newI = this.imag*c+this.real*d;
        this.real = newR;
        this.imag = newI;
    }
385265
public static void blockMultPlus( final double[] dataA, final double []dataB, final double []dataC,
                                     int indexA, int indexB, int indexC,
                                     final int heightA, final int widthA, final int widthC) {
//        for( int i = 0; i < heightA; i++ ) {
//            for( int k = 0; k < widthA; k++ ) {
//                for( int j = 0; j < widthC; j++ ) {
//                    dataC[ i*widthC + j + indexC ] += dataA[i*widthA + k + indexA] * dataB[k*widthC + j + indexB];
//                }
//            }
//        }

        int a = indexA;
        int rowC = indexC;
        for( int i = 0; i < heightA; i++ , rowC += widthC ) {
            int b = indexB;

            final int endC = rowC + widthC;
            final int endA = a + widthA;
            while( a != endA ) {//for( int k = 0; k < widthA; k++ ) {
                double valA = dataA[a++];

                int c = rowC;

                while( c != endC  ) {//for( int j = 0; j < widthC; j++ ) {
                    dataC[ c++ ] += valA * dataB[ b++ ];
                }
            }
        }
    }
717591
def MULS(self, params):
        
        Ra, Rb, Rc = self.get_three_parameters(self.THREE_PARAMETER_COMMA_SEPARATED, params)

        self.check_arguments(low_registers=(Ra, Rb, Rc))
        if Ra != Rc:
            raise iarm.exceptions.RuleError("Third parameter {} is not the same as the first parameter {}".format(Rc, Ra))

        # MULS Ra, Rb, Ra
        def MULS_func():
            self.register[Ra] = self.register[Rb] * self.register[Rc]
            self.set_NZ_flags(self.register[Ra])

        return MULS_func
1065099
func (m1 Mat2) Mul(c float64) Mat2 {
	return Mat2{m1[0] * c, m1[1] * c, m1[2] * c, m1[3] * c}
}
823057
def mul(*args):
    """"""
    if len(args) > 2:
        return add(args[0], add(args[1], args[1:]))

    if len(args) == 1:
        return args[0]

    part1, part2 = args

    if not isinstance(part2, Poly):

        if isinstance(part2, (float, int)):
            part2 = np.asarray(part2)

        if not part2.shape:
            core = part1.A.copy()
            dtype = chaospy.poly.typing.dtyping(
                part1.dtype, part2.dtype)
            for key in part1.keys:
                core[key] = np.asarray(core[key]*part2, dtype)
            return Poly(core, part1.dim, part1.shape, dtype)

        part2 = Poly(part2)

    if part2.dim > part1.dim:
        part1 = chaospy.dimension.setdim(part1, part2.dim)

    elif part2.dim < part1.dim:
        part2 = chaospy.dimension.setdim(part2, part1.dim)

    if np.prod(part1.shape) >= np.prod(part2.shape):
        shape = part1.shape
    else:
        shape = part2.shape

    dtype = chaospy.poly.typing.dtyping(part1.dtype, part2.dtype)
    if part1.dtype != part2.dtype:

        if part1.dtype == dtype:
            part2 = chaospy.poly.typing.asfloat(part2)

        else:
            part1 = chaospy.poly.typing.asfloat(part1)

    core = {}
    for idx1 in part2.A:
        for idx2 in part1.A:
            key = tuple(np.array(idx1) + np.array(idx2))
            core[key] = np.asarray(
                core.get(key, 0) + part2.A[idx1]*part1.A[idx2])
    core = {key: value for key, value in core.items() if np.any(value)}

    out = Poly(core, part1.dim, shape, dtype)
    return out
373077
public static INDArray mul(INDArray x, INDArray y, INDArray z, int... dimensions) {
        if(dimensions == null || dimensions.length == 0) {
            validateShapesNoDimCase(x,y,z);
            return Nd4j.getExecutioner().exec(new OldMulOp(x,y,z));
        }

        return Nd4j.getExecutioner().exec(new BroadcastMulOp(x,y,z,dimensions));
    }
948333
public Vector4f mul(Matrix4x3fc mat, Vector4f dest) {
        float rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30() * w;
        float ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31() * w;
        float rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32() * w;
        dest.x = rx;
        dest.y = ry;
        dest.z = rz;
        dest.w = w;
        return dest;
    }
1250621
public Vector3d mul(Vector3fc v, Vector3d dest) {
        dest.x = x * v.x();
        dest.y = y * v.y();
        dest.z = z * v.z();
        return dest;
    }
662974
func (v1 Vec3) Mul(c float64) Vec3 {
	return Vec3{v1[0] * c, v1[1] * c, v1[2] * c}
}