Example usage for java.lang Double MAX_VALUE

List of usage examples for java.lang Double MAX_VALUE

Introduction

In this page you can find the example usage for java.lang Double MAX_VALUE.

Prototype

double MAX_VALUE

To view the source code for java.lang Double MAX_VALUE.

Click Source Link

Document

A constant holding the largest positive finite value of type double , (2-2-52)·21023.

Usage

From source file:Main.java

public static void main(String[] args) {

    System.out.println(Double.MAX_VALUE);
    System.out.println(Double.longBitsToDouble(0x7fefffffffffffffL));
}

From source file:Main.java

public static void main(String[] args) {
    System.out.println(Double.MIN_VALUE);
    System.out.println(Double.MAX_VALUE);
}

From source file:MainClass.java

public static void main(String args[]) {
    System.out.println(Double.MAX_VALUE);
}

From source file:Main.java

public static void main(String[] args) {

    System.out.println(Double.MAX_EXPONENT);
    System.out.println(Math.getExponent(Double.MAX_VALUE));
}

From source file:MainClass.java

public static void main(String args[]) {
    try {//from  w ww.  j a v  a 2  s.c o m

        FileOutputStream fos = new FileOutputStream(args[0]);

        DataOutputStream dos = new DataOutputStream(fos);

        dos.writeBoolean(false);
        dos.writeByte(Byte.MAX_VALUE);
        dos.writeChar('A');
        dos.writeDouble(Double.MAX_VALUE);
        dos.writeFloat(Float.MAX_VALUE);
        dos.writeInt(Integer.MAX_VALUE);
        dos.writeLong(Long.MAX_VALUE);
        dos.writeShort(Short.MAX_VALUE);

        fos.close();
    } catch (Exception e) {
        System.out.println("Exception: " + e);
    }
}

From source file:Main.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));

    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));
    System.out.println(Float.MIN_VALUE);
    System.out.println(Double.MAX_VALUE);
}

From source file:WrappedClassApp.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));
    System.out.println();/*ww  w  . j  a va  2  s.  c om*/
    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));
    System.out.println(Float.MIN_VALUE);
    System.out.println(Double.MAX_VALUE);
}

From source file:Main.java

public static void main(String args[]) {

    System.out.println("Min byte value   = " + Byte.MIN_VALUE);
    System.out.println("Max byte value   = " + Byte.MAX_VALUE);
    System.out.println("Min short value  = " + Short.MIN_VALUE);
    System.out.println("Max short value  = " + Short.MAX_VALUE);
    System.out.println("Min int value    = " + Integer.MIN_VALUE);
    System.out.println("Max int value    = " + Integer.MAX_VALUE);
    System.out.println("Min float value  = " + Float.MIN_VALUE);
    System.out.println("Max float value  = " + Float.MAX_VALUE);
    System.out.println("Min double value = " + Double.MIN_VALUE);
    System.out.println("Max double value = " + Double.MAX_VALUE);
}

From source file:Main.java

public static void main(String[] args) {
    System.out.println("Byte.MIN = " + Byte.MIN_VALUE);
    System.out.println("Byte.MAX = " + Byte.MAX_VALUE);
    System.out.println("Short.MIN = " + Short.MIN_VALUE);
    System.out.println("Short.MAX = " + Short.MAX_VALUE);
    System.out.println("Integer.MIN = " + Integer.MIN_VALUE);
    System.out.println("Integer.MAX = " + Integer.MAX_VALUE);
    System.out.println("Long.MIN = " + Long.MIN_VALUE);
    System.out.println("Long.MAX = " + Long.MAX_VALUE);
    System.out.println("Float.MIN = " + Float.MIN_VALUE);
    System.out.println("Float.MAX = " + Float.MAX_VALUE);
    System.out.println("Double.MIN = " + Double.MIN_VALUE);
    System.out.println("Double.MAX = " + Double.MAX_VALUE);
}

From source file:edu.berkeley.compbio.phyloutils.NearestNodeFinder.java

public static void main(String[] argv) throws IOException, NoSuchNodeException {
    //service.setGreengenesRawFilename(argv[0]);
    service.setHugenholtzFilename(argv[0]);
    //service.setSynonymService(NcbiTaxonomyClient.getInstance());
    service.init();/*ww  w.ja  v a2s.  c  o  m*/

    final int[] targetIds = IntArrayReader.read(argv[1]);
    int[] queryIds = IntArrayReader.read(argv[2]);
    final double minDistance = Double.parseDouble(argv[3]); // implement leave-one-out at any level

    Map<Integer, Double> results = Parallel.map(new ArrayIterator(queryIds), new Function<Integer, Double>() {
        public Double apply(Integer queryId) {
            try {
                double best = Double.MAX_VALUE;
                for (int targetId : targetIds) {
                    double d = service.minDistanceBetween(queryId, targetId);
                    if (d >= minDistance) {
                        best = Math.min(best, d);
                    }
                }
                return best;
            } catch (NoSuchNodeException e) {
                throw new Error(e);
            }
        }
    });

    String outfileName = argv[4];
    PrintWriter out = new PrintWriter(outfileName);
    out.println("id\tdist");

    for (Map.Entry<Integer, Double> entry : results.entrySet()) {
        out.println(entry.getKey() + "\t" + entry.getValue());
    }
    out.close();
}