Package org.apache.commons.lang3.math
Class IEEE754rUtils
java.lang.Object
org.apache.commons.lang3.math.IEEE754rUtils
Provides IEEE-754r variants of NumberUtils methods.
 
- Since:
- 2.4
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic doublemax(double... array) Returns the maximum value in an array.static doublemax(double a, double b) Gets the maximum of twodoublevalues.static doublemax(double a, double b, double c) Gets the maximum of threedoublevalues.static floatmax(float... array) Returns the maximum value in an array.static floatmax(float a, float b) Gets the maximum of twofloatvalues.static floatmax(float a, float b, float c) Gets the maximum of threefloatvalues.static doublemin(double... array) Returns the minimum value in an array.static doublemin(double a, double b) Gets the minimum of twodoublevalues.static doublemin(double a, double b, double c) Gets the minimum of threedoublevalues.static floatmin(float... array) Returns the minimum value in an array.static floatmin(float a, float b) Gets the minimum of twofloatvalues.static floatmin(float a, float b, float c) Gets the minimum of threefloatvalues.
- 
Constructor Details- 
IEEE754rUtilsDeprecated.TODO Make private in 4.0.Make private in 4.0.
 
- 
- 
Method Details- 
maxReturns the maximum value in an array.- Parameters:
- array- an array, must not be null or empty
- Returns:
- the minimum value in the array
- Throws:
- NullPointerException- if- arrayis- null
- IllegalArgumentException- if- arrayis empty
- Since:
- 3.4 Changed signature from max(double[]) to max(double...)
 
- 
maxGets the maximum of twodoublevalues.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
 
- 
maxGets the maximum of threedoublevalues.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
 
- 
maxReturns the maximum value in an array.- Parameters:
- array- an array, must not be null or empty
- Returns:
- the minimum value in the array
- Throws:
- NullPointerException- if- arrayis- null
- IllegalArgumentException- if- arrayis empty
- Since:
- 3.4 Changed signature from max(float[]) to max(float...)
 
- 
maxGets the maximum of twofloatvalues.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
 
- 
maxGets the maximum of threefloatvalues.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
 
- 
minReturns the minimum value in an array.- Parameters:
- array- an array, must not be null or empty
- Returns:
- the minimum value in the array
- Throws:
- NullPointerException- if- arrayis- null
- IllegalArgumentException- if- arrayis empty
- Since:
- 3.4 Changed signature from min(double[]) to min(double...)
 
- 
minGets the minimum of twodoublevalues.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
 
- 
minGets the minimum of threedoublevalues.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
 
- 
minReturns the minimum value in an array.- Parameters:
- array- an array, must not be null or empty
- Returns:
- the minimum value in the array
- Throws:
- NullPointerException- if- arrayis- null
- IllegalArgumentException- if- arrayis empty
- Since:
- 3.4 Changed signature from min(float[]) to min(float...)
 
- 
minGets the minimum of twofloatvalues.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
 
- 
minGets the minimum of threefloatvalues.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
 
 
-