다음을 통해 공유


StrictMath.CeilDivExact Method

Definition

Overloads

CeilDivExact(Int32, Int32)

Returns the smallest (closest to negative infinity) int value that is greater than or equal to the algebraic quotient.

CeilDivExact(Int64, Int64)

Returns the smallest (closest to negative infinity) long value that is greater than or equal to the algebraic quotient.

CeilDivExact(Int32, Int32)

Returns the smallest (closest to negative infinity) int value that is greater than or equal to the algebraic quotient.

[Android.Runtime.Register("ceilDivExact", "(II)I", "", ApiSince=35)]
public static int CeilDivExact (int x, int y);
[<Android.Runtime.Register("ceilDivExact", "(II)I", "", ApiSince=35)>]
static member CeilDivExact : int * int -> int

Parameters

x
Int32

the dividend

y
Int32

the divisor

Returns

the smallest (closest to negative infinity) int value that is greater than or equal to the algebraic quotient.

Attributes

Remarks

Returns the smallest (closest to negative infinity) int value that is greater than or equal to the algebraic quotient. This method is identical to #ceilDiv(int,int) except that it throws an ArithmeticException when the dividend is Integer#MIN_VALUE Integer.MIN_VALUE and the divisor is -1 instead of ignoring the integer overflow and returning Integer.MIN_VALUE.

The ceil modulus method #ceilMod(int,int) is a suitable counterpart both for this method and for the #ceilDiv(int,int) method.

See Math#ceilDiv(int, int) Math.ceilDiv for examples and a comparison to the integer division / operator.

Added in 18.

Java documentation for java.lang.StrictMath.ceilDivExact(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CeilDivExact(Int64, Int64)

Returns the smallest (closest to negative infinity) long value that is greater than or equal to the algebraic quotient.

[Android.Runtime.Register("ceilDivExact", "(JJ)J", "", ApiSince=35)]
public static long CeilDivExact (long x, long y);
[<Android.Runtime.Register("ceilDivExact", "(JJ)J", "", ApiSince=35)>]
static member CeilDivExact : int64 * int64 -> int64

Parameters

x
Int64

the dividend

y
Int64

the divisor

Returns

the smallest (closest to negative infinity) long value that is greater than or equal to the algebraic quotient.

Attributes

Remarks

Returns the smallest (closest to negative infinity) long value that is greater than or equal to the algebraic quotient. This method is identical to #ceilDiv(long,long) except that it throws an ArithmeticException when the dividend is Long#MIN_VALUE Long.MIN_VALUE and the divisor is -1 instead of ignoring the integer overflow and returning Long.MIN_VALUE.

The ceil modulus method #ceilMod(long,long) is a suitable counterpart both for this method and for the #ceilDiv(long,long) method.

For examples, see Math#ceilDiv(int, int) Math.ceilDiv.

Added in 18.

Java documentation for java.lang.StrictMath.ceilDivExact(long, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to