Java Double to doubleToHexString(double val)

Here you can find the source of doubleToHexString(double val)

Description

double To Hex String

License

Apache License

Parameter

Parameter Description
val a parameter

Declaration

public static String doubleToHexString(double val) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*  w  w  w. ja v  a2 s . com*/
     *
     * @param val
     * @return
     */
    public static String doubleToHexString(double val) {
        long reversed = Long.reverseBytes(Double.doubleToLongBits(val));
        String res = Long.toHexString(reversed);
        res = "0000000000000000".substring(res.length()) + res;
        return res;
    }
}

Related

  1. doubleToFloatArray(double[] dArray)
  2. doubleToFloatArray(double[] doubles)
  3. doubleToFloatMatrix(double[][] matrix)
  4. doubleToFractionStr(final Double d)
  5. doubleToHashString(double value)
  6. doubleToI18nString(double d)
  7. doubleToIndex(final double x)
  8. doubleToLex(double v)
  9. doubleToPercent(double value, int precision)