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

How to use
toLongPow10
method
in
javolution.lang.MathLib

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

origin: org.jscience/jscience

/**
 * Returns the floating point number for the specified <code>double</code>
 * value (convenience method). 
 * 
 * @param doubleValue the <code>double</code> value.
 * @return <code>FloatingPoint.valueOf(longValue, 0)</code>
 */
public static FloatingPoint valueOf(double doubleValue) {
  if (doubleValue == 0.0)
    return FloatingPoint.ZERO;
  if (doubleValue == 1.0)
    return FloatingPoint.ONE;
  if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue))
    return FloatingPoint.NaN;
  // Find the exponent e such as: value == x.xxx * 10^e
  int e = MathLib.floorLog10(MathLib.abs(doubleValue)) - 18 + 1; // 18 digits significand.
  long significand = MathLib.toLongPow10(doubleValue, -e);
  return FloatingPoint.valueOf(significand, e);
}
origin: org.jscience/jscience

/**
 * Returns the real number (inexact except for <code>0.0</code>) 
 * corresponding to the specified <code>double</code> value. 
 * The error is derived from the inexact representation of 
 * <code>double</code> values intrinsic to the 64 bits IEEE 754 format.
 * 
 * @param doubleValue the <code>double</code> value to convert.
 * @return the corresponding real number.
 */
public static Real valueOf(double doubleValue) {
  if (doubleValue == 0.0)
    return Real.ZERO;
  if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue))
    return Real.NaN;
  // Find the exponent e such as: value == x.xxx * 10^e
  int e = MathLib.floorLog10(MathLib.abs(doubleValue)) - 18 + 1; // 18 digits significand.
  long significand = MathLib.toLongPow10(doubleValue, -e);
  int error = (int) MathLib.toLongPow10(Math.ulp(doubleValue), -e) + 1;
  return Real.valueOf(LargeInteger.valueOf(significand), error, e);
}
origin: org.apache.marmotta/marmotta-commons

if (m == 0)
  return 0L;
return toLongPow10(d * 1E16, n - 16);
origin: javolution/javolution

if (m == 0)
  return 0L;
return toLongPow10(d * 1E16, n - 16);
origin: org.javolution/javolution-core-java

if (m == 0)
  return 0L;
return toLongPow10(d * 1E16, n - 16);
origin: apache/marmotta

if (m == 0)
  return 0L;
return toLongPow10(d * 1E16, n - 16);
origin: javolution/javolution

if (digits < 0) { // Use 16 or 17 digits.
  long m17 = MathLib.toLongPow10(d, (17 - 1) - e);
  m = MathLib.toLongPow10(d, (digits - 1) - e);
origin: org.javolution/javolution-core-java

if (digits < 0) { // Use 16 or 17 digits.
  long m17 = MathLib.toLongPow10(d, (17 - 1) - e);
  m = MathLib.toLongPow10(d, (digits - 1) - e);
javolution.langMathLibtoLongPow10

Javadoc

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

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

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Join (org.hibernate.mapping)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Github Copilot alternatives
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