org.apache.commons.lang.math
public class IEEE754rUtils extends Object
Provides IEEE-754r variants of NumberUtils methods.
See: http://en.wikipedia.org/wiki/IEEE_754r
Since: 2.4
Version: $Id: IEEE754rUtils.java 634088 2008-03-06 00:06:05Z niallp $
Method Summary | |
---|---|
static double | max(double[] array) Returns the maximum value in an array. |
static float | max(float[] array) Returns the maximum value in an array. |
static double | max(double a, double b, double c) Gets the maximum of three NaN is only returned if all numbers are NaN as per IEEE-754r. |
static double | max(double a, double b) Gets the maximum of two NaN is only returned if all numbers are NaN as per IEEE-754r. |
static float | max(float a, float b, float c) Gets the maximum of three NaN is only returned if all numbers are NaN as per IEEE-754r. |
static float | max(float a, float b) Gets the maximum of two NaN is only returned if all numbers are NaN as per IEEE-754r. |
static double | min(double[] array) Returns the minimum value in an array. |
static float | min(float[] array) Returns the minimum value in an array. |
static double | min(double a, double b, double c) Gets the minimum of three NaN is only returned if all numbers are NaN as per IEEE-754r. |
static double | min(double a, double b) Gets the minimum of two NaN is only returned if all numbers are NaN as per IEEE-754r. |
static float | min(float a, float b, float c) Gets the minimum of three NaN is only returned if all numbers are NaN as per IEEE-754r. |
static float | min(float a, float b) Gets the minimum of two NaN is only returned if all numbers are NaN as per IEEE-754r. |
Returns the maximum value in an array.
Parameters: array an array, must not be null or empty
Returns: the minimum value in the array
Throws: IllegalArgumentException if array
is null
IllegalArgumentException if array
is empty
Returns the maximum value in an array.
Parameters: array an array, must not be null or empty
Returns: the minimum value in the array
Throws: IllegalArgumentException if array
is null
IllegalArgumentException if array
is empty
Gets the maximum of three double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2 c value 3
Returns: the largest of the values
Gets the maximum of two double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2
Returns: the largest of the values
Gets the maximum of three float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2 c value 3
Returns: the largest of the values
Gets the maximum of two float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2
Returns: the largest of the values
Returns the minimum value in an array.
Parameters: array an array, must not be null or empty
Returns: the minimum value in the array
Throws: IllegalArgumentException if array
is null
IllegalArgumentException if array
is empty
Returns the minimum value in an array.
Parameters: array an array, must not be null or empty
Returns: the minimum value in the array
Throws: IllegalArgumentException if array
is null
IllegalArgumentException if array
is empty
Gets the minimum of three double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2 c value 3
Returns: the smallest of the values
Gets the minimum of two double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2
Returns: the smallest of the values
Gets the minimum of three float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2 c value 3
Returns: the smallest of the values
Gets the minimum of two float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
Parameters: a value 1 b value 2
Returns: the smallest of the values