Elementary.Max Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Max(Double[]) Returns the largest value in an array using IEEE-754r semantics.
Max(Single[]) Returns the largest value in an array using IEEE-754r semantics.
Max(Double, Double) Returns the largest of two numbers using IEEE-754r semantics.
Max(Single, Single) Returns the largest of two numbers using IEEE-754r semantics.
Max(Double, Double, Double) Returns the largest of three numbers using IEEE-754r semantics.
Max(Single, Single, Single) Returns the largest of three numbers using IEEE-754r semantics.

Max(Double[])

Returns the largest value in an array using IEEE-754r semantics.
C#
public static double Max(
	params double[] values
)

Parameters

values  Double[]
An array of real numbers.

Return Value

Double
The largest value in values.

Remarks

In accordance with IEEE-754r, NaN is returned only if all elements of values are NaN. This behavior is different from the Max(Double, Double) function in the Base Class Libraries.

Max(Single[])

Returns the largest value in an array using IEEE-754r semantics.
C#
public static float Max(
	params float[] values
)

Parameters

values  Single[]
An array of real numbers.

Return Value

Single
The largest value in values.

Remarks

In accordance with IEEE-754r, NaN is returned only if all elements of values are NaN. This behavior is different from the Max(Single, Single) function in the Base Class Libraries.

Max(Double, Double)

Returns the largest of two numbers using IEEE-754r semantics.
C#
public static double Max(
	double x,
	double y
)

Parameters

x  Double
A real number.
y  Double
A real number.

Return Value

Double
The larger of x and y.

Remarks

In accordance with IEEE-754r, NaN is returned only if both x and y are NaN. This behavior is different from the Max(Double, Double) function in the Base Class Libraries.

Max(Single, Single)

Returns the largest of two numbers using IEEE-754r semantics.
C#
public static float Max(
	float x,
	float y
)

Parameters

x  Single
A real number.
y  Single
A real number.

Return Value

Single
The larger of x and y.

Remarks

In accordance with IEEE-754r, NaN is returned only if both x and y are NaN. This behavior is different from the Max(Single, Single) function in the Base Class Libraries.

Max(Double, Double, Double)

Returns the largest of three numbers using IEEE-754r semantics.
C#
public static double Max(
	double x,
	double y,
	double z
)

Parameters

x  Double
A real number.
y  Double
A real number.
z  Double
A real number.

Return Value

Double
The larger of x, y, and z.

Remarks

In accordance with IEEE-754r, NaN is returned only if x, y and z are all NaN. This behavior is different from the Max(Double, Double) function in the Base Class Libraries.

Max(Single, Single, Single)

Returns the largest of three numbers using IEEE-754r semantics.
C#
public static float Max(
	float x,
	float y,
	float z
)

Parameters

x  Single
A real number.
y  Single
A real number.
z  Single
A real number.

Return Value

Single
The larger of x, y, and z.

Remarks

In accordance with IEEE-754r, NaN is returned only if x, y and z are all NaN. This behavior is different from the Max(Single, Single) function in the Base Class Libraries.

See Also