Examples of abs()


Examples of DSP.filter.iir.Complex.abs()

   */
  public Complex evaluate( Complex c ) {
    Complex retval = new Complex( 0.0, 0.0 );
    Complex num = N.evaluate( c );
    Complex denom = D.evaluate( c );
    if ( denom.abs() != 0.0 ) retval = num.over( denom );
   
    return retval;
  }
 
 
View Full Code Here

Examples of com.cedarsoft.business.Money.abs()

    }

    int counter = 0;

    Money actualValue = Money.BIG;
    while ( actualValue.abs().isGreaterThan( TARGET_DELTA ) ) {
      double change = INITIAL_RATE_GUESS / Math.pow( 2, counter );

      if ( change < MIN_CHANGE ) {
        return new PangV( actualGuess, actualValue, counter, sum.immutable() );
      }
View Full Code Here

Examples of com.exigen.ie.constrainer.IntExp.abs()

  /**
   * @return an absolute value of this
   */
  public javax.constraints.Var abs() {
    IntExp myVar = (IntExp) getImpl();
    return new Var(getProblem(),myVar.abs());
  }

  /**
   * @return this * this
   */
 
View Full Code Here

Examples of com.nr.Complex.abs()

      Complex r = a[4].add(rts[i].mul(a[5]));
      r = a[3].add(rts[i].mul(r));
      r = a[2].add(rts[i].mul(r));
      r = a[1].add(rts[i].mul(r));
      r = a[0].add(rts[i].mul(r));
      dy[i]=r.abs();
    }
    System.out.printf("zroots: Maximum discrepancy = %f\n", maxel(dy));
    localflag = maxel(dy) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here

Examples of com.nr.Complex.abs()

      Complex r = a[4].add(x.mul(a[5]));
      r = a[3].add(x.mul(r));
      r = a[2].add(x.mul(r));
      r = a[1].add(x.mul(r));
      r = a[0].add(x.mul(r));
      dy[i] = r.abs();
      //dy[i]=abs(a[0]+x*(a[1]+x*(a[2]+x*(a[3]+x*(a[4]+x*a[5])))));
     
    }
    System.out.printf("laguer: Maximum discrepancy = %f\n", maxel(dy));
    localflag = maxel(dy) > sbeps;
View Full Code Here

Examples of com.nr.Complex.abs()

      r = p[3].add(rts2[j].mul(r));
      r = p[2].add(rts2[j].mul(r));
      r = p[1].add(rts2[j].mul(r));
      r = p[0].add(rts2[j].mul(r));
     
      err += r.abs();
    }
    System.out.printf("qroot: Discrepancy = %f\n", abs(err));
    localflag = abs(err) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here

Examples of com.nr.Complex.abs()

      Complex r = p[4].add(rts2[j].mul(p[5]));
      r = p[3].add(rts2[j].mul(r));
      r = p[2].add(rts2[j].mul(r));
      r = p[1].add(rts2[j].mul(r));
      r = p[0].add(rts2[j].mul(r));
      err += r.abs();
    }
    System.out.printf("qroot: Discrepancy = %f\n", abs(err));
    localflag = abs(err) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here

Examples of com.wesabe.api.util.money.Money.abs()

    }

    @Test
    public void shoudlHaveAnAbsoluteValueOfOneDollar() throws Exception {
      Money oneDollar = new Money(decimal("1.00"), USD);
      assertEquals(oneDollar, oneDollar.abs());
    }
   
    @Test
    public void shouldConvertItselfToAMachineReadableString() throws Exception {
      Money oneDollar = new Money(decimal("1.00"), USD);
View Full Code Here

Examples of flanagan.complex.Complex.abs()

        if(this.logOrLinear){
            if(this.userModelSet){
                for(int i=0; i<this.numberOfLineFrequencies; i++){
                    data[2][i] = this.log10lineFrequencies[i];
                    Complex imped = userModel.modelImpedance(this.bestEstimates, this.lineFrequencies[i]*2.0D*Math.PI);
                    data[3][i] = imped.abs();
                }
            }
            else{
                for(int i=0; i<this.numberOfLineFrequencies; i++){
                    data[2][i] = this.log10lineFrequencies[i];
View Full Code Here

Examples of java.math.BigDecimal.abs()

    if (useAbsoluteValue)
    {
      if (n instanceof BigDecimal)
      {
        final BigDecimal td = (BigDecimal) n;
        value = td.abs();
      }
      else
      {
        final BigDecimal td = new BigDecimal(n.toString());
        value = td.abs();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.