Java Double to doubleToBinaryString(double value)

Here you can find the source of doubleToBinaryString(double value)

Description

double To Binary String

License

MIT License

Declaration

public static String doubleToBinaryString(double value) 

Method Source Code

//package com.java2s;
/**/*from w  ww  .  j  a v a 2 s . co  m*/
 * Copyright (c) 2014 Sa?l Pi?a <sauljabin@gmail.com>.
 * 
 * This file is part of GeneticAlgorithm.
 * 
 * GeneticAlgorithm is licensed under The MIT License.
 * For full copyright and license information please see the LICENSE file.
 */

public class Main {
    public static String doubleToBinaryString(double value) {
        return (value < 0 ? "1" : "0")
                + Long.toBinaryString(Double.doubleToLongBits(Math
                        .abs(value)));
    }
}

Related

  1. doubleTo2DArray(double[] array)
  2. doubleToBasicType(double d, Class clazz)
  3. doubleToBits(double in, double min, double max, int numBits, int splits)
  4. doubleToBits(double num)
  5. doubleToChar(double d, char defaultValue)
  6. doubleToDoubleArray(double... a)