Tabnine Logo
MathLib.pow
Code IndexAdd Tabnine to your IDE (free)

How to use
pow
method
in
javolution.lang.MathLib

Best Java code snippets using javolution.lang.MathLib.pow (Showing top 8 results out of 315)

origin: org.jscience/jscience

/**
 * Returns this number raised to the specified power.
 *
 * @param  e the exponent.
 * @return <code>this**e</code>.
 */
public Float64 pow(double e) {
  Float64 r = FACTORY.object();
  r._value = MathLib.pow(this._value, e);
  return r;
}
origin: org.jscience/jscience

/**
 * Returns this number raised to the power of the specified exponent.
 *
 * @param  that the exponent.
 * @return <code>this**that</code>.
 */
public Float64 pow(Float64 that) {
  Float64 r = FACTORY.object();
  r._value = MathLib.pow(this._value, that._value);
  return r;
}
origin: org.apache.marmotta/marmotta-commons

/**
 * Returns the value of the first argument raised to the power of the
 * second argument. 
 *
 * @param x the base.
 * @param y the exponent.
 * @return <code>x<sup>y</sup></code>
 **/
public static double pow(double x, double y) {
  // Use close approximation (+/- LSB)
  if ((x < 0) && (y == (int) y))
    return (((int) y) & 1) == 0 ? pow(-x, y) : -pow(-x, y);
  return MathLib.exp(y * MathLib.log(x));
}
origin: org.javolution/javolution-core-java

/**
 * Returns the value of the first argument raised to the power of the
 * second argument. 
 *
 * @param x the base.
 * @param y the exponent.
 * @return <code>x<sup>y</sup></code>
 **/
public static double pow(double x, double y) {
  // Use close approximation (+/- LSB)
  if ((x < 0) && (y == (int) y))
    return (((int) y) & 1) == 0 ? pow(-x, y) : -pow(-x, y);
  return MathLib.exp(y * MathLib.log(x));
}
origin: apache/marmotta

/**
 * Returns the value of the first argument raised to the power of the
 * second argument. 
 *
 * @param x the base.
 * @param y the exponent.
 * @return <code>x<sup>y</sup></code>
 **/
public static double pow(double x, double y) {
  // Use close approximation (+/- LSB)
  if ((x < 0) && (y == (int) y))
    return (((int) y) & 1) == 0 ? pow(-x, y) : -pow(-x, y);
  return MathLib.exp(y * MathLib.log(x));
}
origin: com.github.mrstampy/esp

/**
 * Returns the root mean square value of the given inputs over the given
 * range.
 * 
 * @param lowerFreqHz
 *          >= 1
 * @param upperFreqHz
 *          < {@link #getUpperMeasurableFrequency()}
 * @param fftd
 *          powers
 * 
 * @return the rms value
 */
public double rms(int lowerFreqHz, int upperFreqHz, double... fftd) {
  assert fftd != null && fftd.length > 0;
  assert lowerFreqHz >= 1 && lowerFreqHz < upperFreqHz && upperFreqHz < getUpperMeasurableFrequency();
  int divisor = fftd.length;
  double sum = 0;
  for (int i = lowerFreqHz; i <= upperFreqHz; i++) {
    sum += MathLib.pow(fftd[i], 2);
  }
  return MathLib.sqrt(new BigDecimal(sum).divide(new BigDecimal(divisor), 10, RoundingMode.HALF_UP).doubleValue());
}
origin: org.jscience/jscience

Amount<Q> m = Amount.newInstance(_unit.root(n));
if (this._isExact) {
  double rootDouble = MathLib.pow(_exactValue, 1.0 / n);
  long rootLong = (long) rootDouble;
  long thisLong = rootLong;
    return m.setExact(rootLong);
double min = MathLib.pow(_minimum, 1.0 / n);
double max = MathLib.pow(_maximum, 1.0 / n);
m._isExact = false;
m._minimum = (min < 0) ? min * INCREMENT : min * DECREMENT;
origin: org.jscience/jscience

/**
 * Returns this complex raised to the specified power.
 *
 * @param   e the exponent.
 * @return  <code>this**e</code>.
 */
public Complex pow(double e) {
  Complex c = FACTORY.object();
  double m = MathLib.pow(this.magnitude(), e);
  double a = this.argument() * e;
  c._real = m * MathLib.cos(a);
  c._imaginary = m * MathLib.sin(a);
  return c;
}
javolution.langMathLibpow

Javadoc

Returns the value of the first argument raised to the power of the second argument.

Popular methods of MathLib

  • min
    Returns the smaller of two long values.
  • sqrt
    Returns the positive square root of the specified value.
  • abs
    Returns the absolute value of the specified long argument.
  • bitLength
    Returns the number of bits in the minimal two's-complement representation of the specified long, exc
  • exp
    Returns #E raised to the specified power.
  • floor
    Returns the largest (closest to positive infinity)double value that is not greater than the argument
  • log
    Returns the natural logarithm (base #E) of the specified value.
  • max
    Returns the greater of two long values.
  • round
    Returns the closest int to the specified argument.
  • toDoublePow10
    Returns the closest double representation of the specified long number multiplied by a power of ten.
  • toDoublePow2
    Returns the closest double representation of the specified long number multiplied by a power of two.
  • toLongPow10
    Returns the closest long representation of the specified double number multiplied by a power of ten.
  • toDoublePow2,
  • toLongPow10,
  • _atan,
  • _ieee754_exp,
  • _ieee754_log,
  • asin,
  • atan,
  • digitLength,
  • floorLog10

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now