提供精确的乘法运算

@param v1 被乘数
@param v2 乘数
@return 积
772020
public static double mul(float v1, float v2) {
		return mul(Float.toString(v1), Float.toString(v2)).doubleValue();
	}
1094814
public static double quadraticEuclidean(double[] v1, double[] v2) {
    final double d1 = v1[0] - v2[0], d2 = v1[1] - v2[1];
    return (d1 * d1) + (d2 * d2);
  }
322553
public static boolean sameMembers(View v1, View v2) {
        if(v1 == v2)
            return true;
        if(v1.size() != v2.size())
            return false;
        Address[][] diff=diff(v1, v2);
        return diff[0].length == 0 && diff[1].length == 0;
    }
1075607
public static float[] vMad(float[] v1, float[] v2, float s) {
        float[] dest = new float[3];
        dest[0] = v1[0] + v2[0] * s;
        dest[1] = v1[1] + v2[1] * s;
        dest[2] = v1[2] + v2[2] * s;
        return dest;
    }
1372280
def get_version_relationship(ver_str1, ver_str2):
    

    # Expect first type to be a digit, per Gentoo spec (used by apk)
    v1_type = TokenType.DIGIT
    v2_type = TokenType.DIGIT
    v1_tok = 0
    v2_tok = 0

    if ver_str1 is None and ver_str2 is None:
        return ComparisonResult.equal_to

    if ver_str1 is None and ver_str2 is not None:
        return ComparisonResult.less_than

    if ver_str1 is not None and ver_str2 is None:
        return ComparisonResult.greater_than

    # Find either the end of one string or the first invalid token of first non-equal token pair.
    while v1_type == v2_type and v1_type != TokenType.END and v1_type != TokenType.INVALID and v1_tok == v2_tok:
        v1_tok, v1_type, ver_str1 = get_token(v1_type, ver_str1)
        v2_tok, v2_type, ver_str2 = get_token(v2_type, ver_str2)

    # Check the value of the current token
    if v1_tok < v2_tok:
        return ComparisonResult.less_than

    if v1_tok > v2_tok:
        return ComparisonResult.greater_than

    if v1_type == v2_type:
        return ComparisonResult.equal_to

    if v1_type == TokenType.SUFFIX and get_token(v1_type, ver_str1)[0] < 0:
        return ComparisonResult.less_than

    if v2_type == TokenType.SUFFIX and get_token(v2_type, ver_str2)[0] < 0:
        return ComparisonResult.greater_than

    if v1_type > v2_type:
        return ComparisonResult.less_than

    if v2_type > v1_type:
        return ComparisonResult.greater_than

    return ComparisonResult.equal_to
529359
public static int compareVersions(String version_1, String version_2)
	{
		for (int j = 0; j < Math.min(version_2.length(), version_1.length()); j++)
		{

			char v1_c = version_1.charAt(j);
			char v2_c = version_2.charAt(j);

			if (v1_c == v2_c)
			{

				continue;
			}

			if (v2_c == '.')
			{

				// version1 higher (e.g. 10.2 -vs- 1.2)

				return (+1);

			} else if (v1_c == '.')
			{

				// version2 higher ( e.g. 1.2 -vs- 10.2 )

				return (-1);

			} else
			{

				return (v1_c - v2_c);
			}
		}

		// longest one wins. e.g. 1.2.1 -vs- 1.2

		return (version_1.length() - version_2.length());
	}
831182
public static function compareVersion($v1, $v2)
    {
        if(empty($v1)){
            return 0;
        }

        $l1  = explode('.',$v1);
        $l2  = explode('.',$v2);
        $len = count($l1) > count($l2) ? count($l1): count($l2);

        for ($i = 0; $i < $len; $i++){
            $n1 = isset($l1[$i])?$l1[$i]:0;
            $n2 = isset($l2[$i])?$l2[$i]:0;
            if ($n1 > $n2){
                return true;//需要更新
            }else if ($n1 < $n2){
                return false;//不需要更新
            }
        }
        return false;
    }
611847
public static double[] timesPlusTimesEquals(final double[] v1, final double s1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] = v1[i] * s1 + v2[i] * s2;
    }
    return v1;
  }
959836
public CompareResult[] compareAll(final Object pvObject1, final Object pvObject2) {
		CompareResult[] lvCompareResults = compareIntern(pvObject1, pvObject2, false);
		return lvCompareResults;
	}
435768
public static double[] minus(final double[] v1, final double s1) {
    final double[] result = new double[v1.length];
    for(int i = 0; i < v1.length; i++) {
      result[i] = v1[i] - s1;
    }
    return result;
  }
1347633
public static int compareOsgiVersions(String v1, String v2) {
		return Version.parseVersion(v1).compareTo(Version.parseVersion(v2));
	}
1144119
function(v1, v2)
{
   var rval = 0;
   
   if(v1.constructor === Array && v2.constructor === Array)
   {
      for(var i = 0; i < v1.length && rval === 0; ++i)
      {
         rval = _compare(v1[i], v2[i]);
      }
   }
   else
   {
      rval = (v1 < v2 ? -1 : (v1 > v2 ? 1 : 0));
   }
   
   return rval;
}
443572
public static boolean epsilonEquals (IVector v1, IVector v2, float epsilon) {
        return Math.abs(v1.x() - v2.x()) <= epsilon && Math.abs(v1.y() - v2.y()) <= epsilon;
    }
1288571
def cross(v1, v2):
    '''
    '''
    return (
        v1[1] * v2[2] - v1[2] * v2[1],
        v1[2] * v2[0] - v1[0] * v2[2],
        v1[0] * v2[1] - v1[1] * v2[0],
    )
460720
public static double sub(Double v1, Double v2) {
		return sub((Number) v1, (Number) v2).doubleValue();
	}
766539
public static double[] plusTimesEquals(final double[] v1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] += s2 * v2[i];
    }
    return v1;
  }
1241371
public static BigDecimal div(String v1, String v2) {
		return div(v1, v2, DEFAUT_DIV_SCALE);
	}