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

How to use
toDoublePow2
method
in
javolution.lang.MathLib

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

origin: apache/marmotta

  return 0.0;
if (m == Long.MIN_VALUE)
  return toDoublePow2(Long.MIN_VALUE >> 1, n + 1);
if (m < 0)
  return -toDoublePow2(-m, n);
int bitLength = MathLib.bitLength(m);
int shift = bitLength - 53;
  if (exp <= -54)
    return 0.0;
  return toDoublePow2(m, n + 54) / 18014398509481984L; // 2^54 Exact.
origin: javolution/javolution

  return 0.0;
if (m == Long.MIN_VALUE)
  return toDoublePow2(Long.MIN_VALUE >> 1, n + 1);
if (m < 0)
  return -toDoublePow2(-m, n);
int bitLength = MathLib.bitLength(m);
int shift = bitLength - 53;
  if (exp <= -54)
    return 0.0;
  return toDoublePow2(m, n + 54) / 18014398509481984L; // 2^54 Exact.
origin: org.apache.marmotta/marmotta-commons

  return 0.0;
if (m == Long.MIN_VALUE)
  return toDoublePow2(Long.MIN_VALUE >> 1, n + 1);
if (m < 0)
  return -toDoublePow2(-m, n);
int bitLength = MathLib.bitLength(m);
int shift = bitLength - 53;
  if (exp <= -54)
    return 0.0;
  return toDoublePow2(m, n + 54) / 18014398509481984L; // 2^54 Exact.
origin: org.javolution/javolution-core-java

  return 0.0;
if (m == Long.MIN_VALUE)
  return toDoublePow2(Long.MIN_VALUE >> 1, n + 1);
if (m < 0)
  return -toDoublePow2(-m, n);
int bitLength = MathLib.bitLength(m);
int shift = bitLength - 53;
  if (exp <= -54)
    return 0.0;
  return toDoublePow2(m, n + 54) / 18014398509481984L; // 2^54 Exact.
origin: org.jscience/jscience

/**
 * Returns the value of this large integer as a <code>double</code>.
 * 
 * @return the numeric value represented by this integer after conversion
 *         to type <code>double</code>.
 */
public double doubleValue() {
  if (_size == 0) return 0;
  if (_size <= 1) 
    return _isNegative ? -_words[0] : _words[0];
    
  // Calculates bits length (ignores sign).    
  final int n = _size - 1;
  final int bitLength = MathLib.bitLength(_words[n]) + (n << 6) - n;
  // Keep 63 most significant bits.
  int shift = 63 - bitLength;
  LargeInteger int63 = this.times2pow(shift);
  double d = MathLib.toDoublePow2(int63._words[0], -shift);
  return _isNegative ? -d : d;
}
origin: javolution/javolution

long mantissa = (shift < 0) ? (x3 << 31) | (x2 >>> 1) : // x3 is 32 bits.
    (((x3 << 32) | x2) << shift) | (x1 >>> (32 - shift));
return toDoublePow2(mantissa, pow2);
  pow2 -= i;
return toDoublePow2(x1, pow2);
origin: org.apache.marmotta/marmotta-commons

long mantissa = (shift < 0) ? (x3 << 31) | (x2 >>> 1) : // x3 is 32 bits.
    (((x3 << 32) | x2) << shift) | (x1 >>> (32 - shift));
return toDoublePow2(mantissa, pow2);
  pow2 -= i;
return toDoublePow2(x1, pow2);
origin: org.javolution/javolution-core-java

long mantissa = (shift < 0) ? (x3 << 31) | (x2 >>> 1) : // x3 is 32 bits.
    (((x3 << 32) | x2) << shift) | (x1 >>> (32 - shift));
return toDoublePow2(mantissa, pow2);
  pow2 -= i;
return toDoublePow2(x1, pow2);
origin: apache/marmotta

long mantissa = (shift < 0) ? (x3 << 31) | (x2 >>> 1) : // x3 is 32 bits.
    (((x3 << 32) | x2) << shift) | (x1 >>> (32 - shift));
return toDoublePow2(mantissa, pow2);
  pow2 -= i;
return toDoublePow2(x1, pow2);
javolution.langMathLibtoDoublePow2

Javadoc

Returns the closest double representation of the specified long number multiplied by a power of two.

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.
  • 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.
  • toLongPow10
    Returns the closest long representation of the specified double number multiplied by a power of ten.
  • toDoublePow10,
  • toLongPow10,
  • _atan,
  • _ieee754_exp,
  • _ieee754_log,
  • asin,
  • atan,
  • digitLength,
  • floorLog10

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JPanel (javax.swing)
  • 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