THE PACKAGE JAVA.LANG
java.lang.Math
20.11
20.11.28
public static double min(double a, double b)
Of two evils I have chose the least.
Matthew Prior (1664 1721),
Imitation of Horace
The result is the smaller of the two arguments that is, the one closer to negative
infinity. If the arguments have the same value, the result is that same value.
Special cases:
If one argument is positive zero and the other is negative zero, the result is
negative zero.
If either argument is NaN, the result is NaN.
[This specification for the method
min
is scheduled for introduction in Java
version 1.1. In previous versions of Java,
min(0.0d, 0.0d)
returns
0.0d
, which
is not correct.]
20.11.29
public static int max(int a, int b)
The result is the larger of the two arguments that is, the one closer to the value of
Integer.MAX_VALUE
( 20.7.2). If the arguments have the same value, the result
is that same value.
20.11.30
public static long max(long a, long b)
The result is the larger of the two arguments that is, the one closer to the value of
Long.MAX_VALUE
( 20.8.2). If the arguments have the same value, the result is
that same value.
20.11.31
public static float max(float a, float b)
The result is the larger of the two arguments that is, the one closer to positive
infinity. If the arguments have the same value, the result is that same value.
Special cases:
If one argument is positive zero and the other is negative zero, the result is
positive zero.
If either argument is NaN, the result is NaN.
529
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved