Sub amounts.

@param n1 the n 1
@param n2 the n 2
@return the double
506904
public static double subAmounts(final double n1, final double n2) {
		final BigDecimal b1 = new BigDecimal(n1);
		final BigDecimal b2 = new BigDecimal(n2);
		BigDecimal b3 = b1.subtract(b2);
		b3 = b3.setScale(3, BigDecimal.ROUND_HALF_UP);
		final double result = b3.doubleValue();
		return result;
	}
179393
void accept(final double value) {
		++_n;

		final double n = _n;
		final double d = value - _m1.value();
		final double dN = d/n;
		final double dN2 = dN*dN;
		final double t1 = d*dN*(n - 1.0);

		_m1.add(dN);
		_m4.add(t1*dN2*(n*n - 3.0*n + 3.0))
			.add(6.0*dN2*_m2.value() - 4.0*dN*_m3.value());
		_m3.add(t1*dN*(n - 2.0) - 3.0*dN*_m2.value());
		_m2.add(t1);
	}
131156
public static final Point subtract(Point p1, Point p2)
    {
        return new AbstractPoint(p1.getX() - p2.getX(), p1.getY() - p2.getY());
    }
930144
public static double Y(int n, double x) {
        double by, bym, byp, tox;

        if (n == 0) return Y0(x);
        if (n == 1) return Y(x);

        tox = 2.0 / x;
        by = Y(x);
        bym = Y0(x);
        for (int j = 1; j < n; j++) {
            byp = j * tox * by - bym;
            bym = by;
            by = byp;
        }
        return by;
    }
1287104
@Override
  public Double divide2(Double arg1, long arg2) {
    if (arg1 == null) {
      return Double.NaN;
    } else {
      return arg1 / arg2;
    }
  }
596002
private Rational doubleSum(int n) {
        Rational resul = Rational.ZERO;
        for (int k = 0; k <= n; k++) {
            Rational jsum = Rational.ZERO;
            BigInteger bin = BigInteger.ONE;
            for (int j = 0; j <= k; j++) {
                BigInteger jpown = BigInteger.valueOf(j).pow(n);
                if (j % 2 == 0) {
                    jsum = jsum.add(bin.multiply(jpown));
                } else {
                    jsum = jsum.subtract(bin.multiply(jpown));
                }
                /* update binomial(k,j) recursively
                 */
                bin = bin.multiply(BigInteger.valueOf(k - j)).divide(BigInteger.valueOf(j + 1));
            }
            resul = resul.add(jsum.divide(BigInteger.valueOf(k + 1)));
        }
        return resul;
    }
877505
public static int compare(Integer n1, Integer n2)
   {
      int result;
      if (n1 == null || n2 == null)
      {
         result = (n1 == null && n2 == null ? 0 : (n1 == null ? 1 : -1));
      }
      else
      {
         result = n1.compareTo(n2);
      }
      return (result);
   }
1267923
public static double addAmounts(final double num1, final double num2) {
		final BigDecimal b1 = new BigDecimal(num1);
		final BigDecimal b2 = new BigDecimal(num2);
		BigDecimal b3 = b1.add(b2);
		b3 = b3.setScale(3, BigDecimal.ROUND_HALF_UP);
		final double result = b3.doubleValue();
		return result;
	}
1293698
public FDBigInt sub(FDBigInt other)
	{
		int r[] = new int[this.nWords];
		int i;
		int n = this.nWords;
		int m = other.nWords;
		int nzeros = 0;
		long c = 0L;
		for (i = 0; i < n; i++)
		{
			c += (long) this.data[i] & 0xffffffffL;
			if (i < m)
			{
				c -= (long) other.data[i] & 0xffffffffL;
			}
			if ((r[i] = (int) c) == 0)
				nzeros++;
			else
				nzeros = 0;
			c >>= 32; // signed shift
		}
		assert c == 0L : c; // borrow out of subtract
		assert dataInRangeIsZero(i, m, other); // negative result of subtract
		return new FDBigInt(r, n - nzeros);
	}
694165
public static long subSeconds(final Date date1, final Date date2) {

    return subTime(date1, date2, DatePeriod.SECOND);
  }
139370
public static int multiply(double num1, double num2) {
        BigDecimal num1Bd = new BigDecimal(Double.toString(num1));
        BigDecimal num2Bd = new BigDecimal(Double.toString(num2));
        MathContext mathContext = new MathContext(num1Bd.precision(), RoundingMode.HALF_UP);
        return num1Bd.multiply(num2Bd, mathContext).intValue();
    }
370378
public static void subtract(double[] array1, double[] array2) {
        assert (array1.length == array2.length);
        for (int i=0; i<array1.length; i++) {
            array1[i] -= array2[i];
        }
    }
258385
public double evaluate(List<? extends Solution<?>> set1, List<? extends Solution<?>> set2) {
    double result ;
    int sum = 0 ;

    if (set2.size()==0) {
      if (set1.size()==0) {
        result = 0.0 ;
      } else {
        result = 1.0 ;
      }
    } else {
      for (Solution<?> solution : set2) {
        if (SolutionListUtils.isSolutionDominatedBySolutionList(solution, set1)) {
          sum++;
        }
      }
      result = (double)sum/set2.size() ;
    }
    return result ;
  }
1198796
public static BigDecimal mul(String v1, String v2) {
		return mul(new BigDecimal(v1), new BigDecimal(v2));
	}
1229422
public static function sub($float1, $float2)
    {
        if (!static::is($float1) || !static::is($float2)) {
            throw new \InvalidArgumentException("The \$float1 and \$float2 parameters must be of type float.");
        }

        return ($float1 - $float2);
    }
184686
public double getCount(A first, B second) {
    if (counts.containsKey(first) && counts.get(first).containsKey(second)) {
      return counts.get(first).get(second);
    }
    return 0.0;
  }
589498
def subtract(self, number1, number2):
        """"""
        return self._format_result(int(number1) - int(number2))