jdk/src/java.base/share/classes/java/lang/Math.java
changeset 44924 dbfcc317533b
parent 44263 7a9297d467e7
child 44926 32eeee1c0abd
equal deleted inserted replaced
44923:9a62aeffc28c 44924:dbfcc317533b
     1 /*
     1 /*
     2  * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  1440     public static long max(long a, long b) {
  1440     public static long max(long a, long b) {
  1441         return (a >= b) ? a : b;
  1441         return (a >= b) ? a : b;
  1442     }
  1442     }
  1443 
  1443 
  1444     // Use raw bit-wise conversions on guaranteed non-NaN arguments.
  1444     // Use raw bit-wise conversions on guaranteed non-NaN arguments.
  1445     private static long negativeZeroFloatBits  = Float.floatToRawIntBits(-0.0f);
  1445     private static final long negativeZeroFloatBits  = Float.floatToRawIntBits(-0.0f);
  1446     private static long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d);
  1446     private static final long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d);
  1447 
  1447 
  1448     /**
  1448     /**
  1449      * Returns the greater of two {@code float} values.  That is,
  1449      * Returns the greater of two {@code float} values.  That is,
  1450      * the result is the argument closer to positive infinity. If the
  1450      * the result is the argument closer to positive infinity. If the
  1451      * arguments have the same value, the result is that same
  1451      * arguments have the same value, the result is that same