Examples of sqrt()


Examples of calculator.sci.SciCalculatorService.sqrt()

        double values[] = {1.0D, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D};
        System.out.println("\tInvoking Java Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tAverage of 1,2,3,4,5,6,7,8,9 = ")
            .append(sciCalculator.average(values)).toString());
        System.out.println("\n\tInvoking JavaScript Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tSquare Root of 81 = ").append(sciCalculator
            .sqrt(81D)).toString());
        System.out.println("\tInvoking Java Implementation configured for Property  ... ");
        System.out.println((new StringBuilder()).append("\tSine 90 Degrees = ")
            .append(sciCalculator.sin(90D)).toString());
        System.out.println((new StringBuilder()).append("\tCos 90 Degrees = ").append(sciCalculator.cos(90D))
View Full Code Here

Examples of com.confluenity.jaylen.entity.math.Decimal.sqrt()

  public Decimal getDistance(final Particle other) {
    Decimal squareDistance = new Decimal();
    for (int j = 0; j < DIMENSIONS; j++) {
      squareDistance.add(getX().sub(other.getX()).sqr());
    }
    return squareDistance.sqrt();
  }

  public Decimal getVelocity() {
    Decimal velocityModule = new Decimal();
    for (int j = 0; j < DIMENSIONS; j++) {
View Full Code Here

Examples of com.confluenity.jaylen.entity.math.Decimal.sqrt()

  public Decimal getVelocity() {
    Decimal velocityModule = new Decimal();
    for (int j = 0; j < DIMENSIONS; j++) {
      velocityModule.add(getVx().sqr());
    }
    return velocityModule.sqrt();
  }

  public Decimal getX() {
    return r.elementAt(X);
  }
View Full Code Here

Examples of mikera.vectorz.AVector.sqrt()

      } else {
        if (!line.isFullyMutable()) {
          line = line.sparseClone();
          data[i] = line;
        }
        line.sqrt();
      }
    }
  }
 
  @Override
View Full Code Here

Examples of mikera.vectorz.Vector.sqrt()

    Vector v=Vector.createLength(8388608);
    Vectorz.fillGaussian(v);
   
    for (int i=0; i<runs; i++) {
      v.add(0.375);
      v.sqrt();
      v.scale(2.0);
    }   
  }
 
  public void timeImmutable(int runs) {
View Full Code Here

Examples of mikera.vectorz.Vector.sqrt()

    Vector v=Vector.createLength(8388608);
    Vectorz.fillGaussian(v);

    for (int i=0; i<runs; i++) {
      v.scaleAdd(4.0, 1.5); // combine scaling and addition
      v.sqrt();
    }   
  }

  /**
   * @param args
View Full Code Here

Examples of org.apache.commons.math3.complex.Complex.sqrt()

        } else if (token.equals("sin")) {
          stackAnswer.push(complexFormat.format(a.sin()));
        } else if (token.equals("sinh")) {
          stackAnswer.push(complexFormat.format(a.sinh()));
        } else if (token.equals("sqrt")) {
          stackAnswer.push(complexFormat.format(a.sqrt()));
        } else if (token.equals("tan")) {
          stackAnswer.push(complexFormat.format(a.tan()));
        } else if (token.equals("tanh")) {
          stackAnswer.push(complexFormat.format(a.tanh()));
        } else if (token.equals("pow")) {
View Full Code Here

Examples of org.zkoss.zss.engine.Complex.sqrt()

   * @param ctx the function context.
   * @return the square root of a complex number.
   */
  public static Object engineerImsqrt(Object[] args, XelContext ctx) {
    Complex complex = UtilFns.validateComplex(args[0].toString());
    return UtilFns.cToComplex(complex.sqrt(), complex.getSuffix());
  }
 
  /**
   * Returns the difference between two complex numbers.
   * This function implements the IMSUB(arg0, arg1) spreadsheet function.
View Full Code Here

Examples of ral.Real.sqrt()

   * Calculates square root of {@code this.value} according to {@link ral.Real#sqrt()}.
   * @return new instance of {@code Decimal} which value is square root of {@code this.value}.
   */
  public Decimal sqrt() {
    Real result = new Real(this.value);
    result.sqrt();
    return new Decimal(result);
  }

}
View Full Code Here

Examples of weka.core.matrix.DoubleVector.sqrt()

      if( paceEstimator == pace6Estimator )
  ATilde = dc.pace6( AHat );
      else if( paceEstimator == pace2Estimator )
  ATilde = dc.pace2( AHat );
      else ATilde = dc.pace4( AHat );
      aTilde = ATilde.sqrt().times( aHat.sign() );
      break;
    case olsEstimator:
      aTilde = aHat.copy();
      break;
    case aicEstimator:
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.