Subtrahiert den uebergebenen Operanden und liefert als Ergebnis eine neue
{@link PackedDecimal} zurueck

@param operand Summand
@return Summe
504897
public PackedDecimal subtract(PackedDecimal operand) {
        if (this.isBruch() || operand.isBruch()) {
            return subtract(operand.toBruch());
        } else {
            return subtract(operand.toBigDecimal());
        }
    }
1258977
public static long multiplyExact(long x, long y) {
        long r = x * y;
        long ax = Math.abs(x);
        long ay = Math.abs(y);
        if (((ax | ay) >>> 31 != 0)) {
            // Some bits greater than 2^31 that might cause overflow
            // Check the result using the divide operator
            // and check for the special case of Long.MIN_VALUE * -1
           if (((y != 0) && (r / y != x)) ||
               (x == Long.MIN_VALUE && y == -1)) {
                throw new ArithmeticException("long overflow");
            }
        }
        return r;
    }
186373
public static SoyValue minus(SoyValue operand0, SoyValue operand1) {
    if (operand0 instanceof IntegerData && operand1 instanceof IntegerData) {
      return IntegerData.forValue(operand0.longValue() - operand1.longValue());
    } else {
      return FloatData.forValue(operand0.numberValue() - operand1.numberValue());
    }
  }
867158
public double sum() {
	double res = 0.0;
	for (int i = 0; i < len; i++) {
	    res += vect[i];
	}
	return res;	
    }
1114977
public static double sum(Array array) throws ExpressionException {
	if (array.getDimension() > 1) throw new ExpressionException("can only get sum/avg from 1 dimensional arrays");

	double rtn = 0;
	int len = array.size();
	// try {
	for (int i = 1; i <= len; i++) {
	    rtn += _toDoubleValue(array, i);
	}
	/*
	 * } catch (PageException e) { throw new
	 * ExpressionException("exception while execute array operation: "+e.getMessage()); }
	 */
	return rtn;
    }
305924
private static Number sum_impl_(Number x, Number y) {
        if (x instanceof Double || y instanceof Double)
            return Double.valueOf(x.doubleValue() + y.doubleValue());
        else
            return Long.valueOf(x.longValue() + y.longValue());
    }
843168
public AbstractNumber multiply(Bruch operand) {
        BigInteger z = getZaehler().multiply(operand.getZaehler());
        BigInteger n = getNenner().multiply(operand.getNenner());
        return Bruch.of(z, n).kuerzen();
    }
210484
public PackedDecimal subtract(Bruch operand) {
        AbstractNumber result = toBruch().subtract(operand);
        return PackedDecimal.valueOf(result);
    }
1213197
public static double mean(@javax.annotation.Nonnull final double[] op) {
    return com.simiacryptus.util.ArrayUtil.sum(op) / op.length;
  }
333250
public BigDecimal subtract(BigDecimal subtrahend) {
        if (this.intCompact != INFLATED) {
            if ((subtrahend.intCompact != INFLATED)) {
                return add(this.intCompact, this.scale, -subtrahend.intCompact, subtrahend.scale);
            } else {
                return add(this.intCompact, this.scale, subtrahend.intVal.negate(), subtrahend.scale);
            }
        } else {
            if ((subtrahend.intCompact != INFLATED)) {
                // Pair of subtrahend values given before pair of
                // values from this BigDecimal to avoid need for
                // method overloading on the specialized add method
                return add(-subtrahend.intCompact, subtrahend.scale, this.intVal, this.scale);
            } else {
                return add(this.intVal, this.scale, subtrahend.intVal.negate(), subtrahend.scale);
            }
        }
    }
82022
public static function convertToNumberIfFraction(&$operand)
    {
        if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) {
            $sign = ($match[1] == '-') ? '-' : '+';
            $fractionFormula = '='.$sign.$match[2].$sign.$match[3];
            $operand = PHPExcel_Calculation::getInstance()->_calculateFormulaValue($fractionFormula);
            return true;
        }
        return false;
    }
648693
@Override
	public double integrate(DoubleUnaryOperator integrand) {
		double	lowerBound			= getLowerBound();
		double	upperBound			= getUpperBound();
		double	range				= upperBound-lowerBound;

		// Create random number sequence generator (we use MersenneTwister)
		MersenneTwister		mersenneTwister		= new MersenneTwister(seed);

		DoubleStream randomNumberSequence = IntStream.range(0, numberOfEvaluationPoints).sequential().mapToDouble(new IntToDoubleFunction() {
			@Override
			public double applyAsDouble(int i) {
				return mersenneTwister.nextDouble();
			}
		});

		return randomNumberSequence.map(new DoubleUnaryOperator() {
			@Override
			public double applyAsDouble(double x) {
				return (integrand.applyAsDouble(lowerBound + x * range));
			}
		}).sum() * range / numberOfEvaluationPoints;
	}
917555
public static double sum (double[] vector) {
        // Declare and initialize the accumulator:
        double total = 0.0;

        // Iterate over the vector:
        for (int i = 0; i < vector.length; i++) {
            total += vector[i];
        }

        // Done, return:
        return total;
    }
1206380
public NumberExpression<Double> avg() {
        if (avg == null) {
            avg = Expressions.numberOperation(Double.class, Ops.AggOps.AVG_AGG, mixin);
        }
        return avg;
    }
340060
@Override
	public double integrate(DoubleUnaryOperator integrand) {
		double	lowerBound			= getLowerBound();
		double	upperBound			= getUpperBound();
		double	range				= upperBound-lowerBound;

		// Create random number sequence generator (we use MersenneTwister)
		MersenneTwister		mersenneTwister		= new MersenneTwister(seed);

		double integral = 0.0;
		for(int i=0; i<numberOfEvaluationPoints; i++) {
			integral += integrand.applyAsDouble(lowerBound + mersenneTwister.nextDouble() * range);
		}

		return integral * range / numberOfEvaluationPoints;
	}
289465
public static float sum(float[] c) {
		float s = 0;
		for (int i = 0; i < c.length; i++) {
			s+=c[i];
		}
		return s;
	}
1247630
public PackedDecimal add(Bruch summand) {
        AbstractNumber summe = toBruch().add(summand);
        return PackedDecimal.valueOf(summe);
    }