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

How to use
exp
method
in
javolution.lang.MathLib

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

origin: org.apache.marmotta/marmotta-commons

/**
 * Returns the hyperbolic sine of x.
 * 
 * @param x the value for which the hyperbolic sine is calculated.
 * @return <code>(exp(x) - exp(-x)) / 2</code>
 **/
public static double sinh(double x) {
  return (MathLib.exp(x) - MathLib.exp(-x)) * 0.5;
}
origin: javolution/javolution

/**
 * Returns the hyperbolic cosine of x.
 * 
 * @param x the value for which the hyperbolic cosine is calculated.
 * @return <code>(exp(x) + exp(-x)) / 2</code>
 **/
public static double cosh(double x) {
  return (MathLib.exp(x) + MathLib.exp(-x)) * 0.5;
}
/**/
origin: org.javolution/javolution-core-java

/**
 * Returns the hyperbolic cosine of x.
 * 
 * @param x the value for which the hyperbolic cosine is calculated.
 * @return <code>(exp(x) + exp(-x)) / 2</code>
 **/
public static double cosh(double x) {
  return (MathLib.exp(x) + MathLib.exp(-x)) * 0.5;
}
origin: org.javolution/javolution-core-java

/**
 * Returns the hyperbolic tangent of x.
 * 
 * @param x the value for which the hyperbolic tangent is calculated.
 * @return <code>(exp(2 * x) - 1) / (exp(2 * x) + 1)</code>
 **/
public static double tanh(double x) {
  return (MathLib.exp(2 * x) - 1) / (MathLib.exp(2 * x) + 1);
}
origin: apache/marmotta

/**
 * Returns the hyperbolic cosine of x.
 * 
 * @param x the value for which the hyperbolic cosine is calculated.
 * @return <code>(exp(x) + exp(-x)) / 2</code>
 **/
public static double cosh(double x) {
  return (MathLib.exp(x) + MathLib.exp(-x)) * 0.5;
}
origin: org.apache.marmotta/marmotta-commons

/**
 * Returns the hyperbolic cosine of x.
 * 
 * @param x the value for which the hyperbolic cosine is calculated.
 * @return <code>(exp(x) + exp(-x)) / 2</code>
 **/
public static double cosh(double x) {
  return (MathLib.exp(x) + MathLib.exp(-x)) * 0.5;
}
origin: javolution/javolution

/**
 * Returns the hyperbolic sine of x.
 * 
 * @param x the value for which the hyperbolic sine is calculated.
 * @return <code>(exp(x) - exp(-x)) / 2</code>
 **/
public static double sinh(double x) {
  return (MathLib.exp(x) - MathLib.exp(-x)) * 0.5;
}
/**/
origin: javolution/javolution

/**
 * Returns the hyperbolic tangent of x.
 * 
 * @param x the value for which the hyperbolic tangent is calculated.
 * @return <code>(exp(2 * x) - 1) / (exp(2 * x) + 1)</code>
 **/
public static double tanh(double x) {
  return (MathLib.exp(2 * x) - 1) / (MathLib.exp(2 * x) + 1);
}
/**/
origin: org.apache.marmotta/marmotta-commons

/**
 * Returns the hyperbolic tangent of x.
 * 
 * @param x the value for which the hyperbolic tangent is calculated.
 * @return <code>(exp(2 * x) - 1) / (exp(2 * x) + 1)</code>
 **/
public static double tanh(double x) {
  return (MathLib.exp(2 * x) - 1) / (MathLib.exp(2 * x) + 1);
}
origin: apache/marmotta

/**
 * Returns the hyperbolic sine of x.
 * 
 * @param x the value for which the hyperbolic sine is calculated.
 * @return <code>(exp(x) - exp(-x)) / 2</code>
 **/
public static double sinh(double x) {
  return (MathLib.exp(x) - MathLib.exp(-x)) * 0.5;
}
origin: org.javolution/javolution-core-java

/**
 * Returns the hyperbolic sine of x.
 * 
 * @param x the value for which the hyperbolic sine is calculated.
 * @return <code>(exp(x) - exp(-x)) / 2</code>
 **/
public static double sinh(double x) {
  return (MathLib.exp(x) - MathLib.exp(-x)) * 0.5;
}
origin: apache/marmotta

/**
 * Returns the hyperbolic tangent of x.
 * 
 * @param x the value for which the hyperbolic tangent is calculated.
 * @return <code>(exp(2 * x) - 1) / (exp(2 * x) + 1)</code>
 **/
public static double tanh(double x) {
  return (MathLib.exp(2 * x) - 1) / (MathLib.exp(2 * x) + 1);
}
origin: org.jscience/jscience

/**
 * Returns the exponential number <i>e</i> raised to the power of this
 * number.
 *
 * @return <code>exp(this)</code>.
 */
public Float64 exp() {
  Float64 r = FACTORY.object();
  r._value = MathLib.exp(this._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: 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: 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: org.jscience/jscience

/**
 * Returns the exponential number <i>e</i> raised to the power of
 * this complex.
 * Note: <code><i><b>e</b></i><sup><font size=+0><b>PI</b>*<i><b>i
 * </b></i></font></sup> = -1</code>
 *
 * @return  <code>exp(this)</code>.
 */
public Complex exp() {
  Complex c = FACTORY.object();
  double m = MathLib.exp(this._real);
  c._real = m * MathLib.cos(this._imaginary);
  c._imaginary = m * MathLib.sin(this._imaginary);
  return c;
}
origin: org.jscience/jscience

/**
 * Returns this complex raised to the power of the specified complex
 * exponent.
 *
 * @param   that the exponent.
 * @return  <code>this**that</code>.
 */
public Complex pow(Complex that) {
  Complex c = FACTORY.object();
  double r1 = MathLib.log(this.magnitude());
  double i1 = this.argument();
  double r2 = (r1 * that._real) - (i1 * that._imaginary);
  double i2 = (r1 * that._imaginary) + (i1 * that._real);
  double m = MathLib.exp(r2);
  c._real = m * MathLib.cos(i2);
  c._imaginary = m * MathLib.sin(i2);
  return c;
}
javolution.langMathLibexp

Javadoc

Returns #E raised to the specified power.

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
  • 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.
  • pow
    Returns the value of the first argument raised to the power of the second argument.
  • 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

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Runner (org.openjdk.jmh.runner)
  • Top Vim 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