public class IEEE754rUtils extends Object
Provides IEEE-754r variants of NumberUtils methods.
Constructor and Description |
---|
IEEE754rUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
max(double... array)
Returns the maximum value in an array.
|
static double |
max(double a,
double b)
Gets the maximum of two
double values. |
static double |
max(double a,
double b,
double c)
Gets the maximum of three
double values. |
static float |
max(float... array)
Returns the maximum value in an array.
|
static float |
max(float a,
float b)
Gets the maximum of two
float values. |
static float |
max(float a,
float b,
float c)
Gets the maximum of three
float values. |
static double |
min(double... array)
Returns the minimum value in an array.
|
static double |
min(double a,
double b)
Gets the minimum of two
double values. |
static double |
min(double a,
double b,
double c)
Gets the minimum of three
double values. |
static float |
min(float... array)
Returns the minimum value in an array.
|
static float |
min(float a,
float b)
Gets the minimum of two
float values. |
static float |
min(float a,
float b,
float c)
Gets the minimum of three
float values. |
public IEEE754rUtils()
public static double min(double... array)
Returns the minimum value in an array.
array
- an array, must not be null or emptyIllegalArgumentException
- if array
is null
IllegalArgumentException
- if array
is emptypublic static float min(float... array)
Returns the minimum value in an array.
array
- an array, must not be null or emptyIllegalArgumentException
- if array
is null
IllegalArgumentException
- if array
is emptypublic static double min(double a, double b, double c)
Gets the minimum of three double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2c
- value 3public static double min(double a, double b)
Gets the minimum of two double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2public static float min(float a, float b, float c)
Gets the minimum of three float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2c
- value 3public static float min(float a, float b)
Gets the minimum of two float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2public static double max(double... array)
Returns the maximum value in an array.
array
- an array, must not be null or emptyIllegalArgumentException
- if array
is null
IllegalArgumentException
- if array
is emptypublic static float max(float... array)
Returns the maximum value in an array.
array
- an array, must not be null or emptyIllegalArgumentException
- if array
is null
IllegalArgumentException
- if array
is emptypublic static double max(double a, double b, double c)
Gets the maximum of three double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2c
- value 3public static double max(double a, double b)
Gets the maximum of two double
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2public static float max(float a, float b, float c)
Gets the maximum of three float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2c
- value 3public static float max(float a, float b)
Gets the maximum of two float
values.
NaN is only returned if all numbers are NaN as per IEEE-754r.
a
- value 1b
- value 2Copyright © 2001–2016 The Apache Software Foundation. All rights reserved.