BigDecimal.Divide Method (Java.Math)

Caution

deprecated

Returns a BigDecimal whose value is (this /
divisor)
, and whose scale is as specified.

[Android.Runtime.Register("divide", "(Ljava/math/BigDecimal;II)Ljava/math/BigDecimal;", "GetDivide_Ljava_math_BigDecimal_IIHandler")]
[System.Obsolete("deprecated")]
public virtual Java.Math.BigDecimal? Divide (Java.Math.BigDecimal? divisor, int scale, Java.Math.RoundOptions roundingMode);
[<Android.Runtime.Register("divide", "(Ljava/math/BigDecimal;II)Ljava/math/BigDecimal;", "GetDivide_Ljava_math_BigDecimal_IIHandler")>]
[<System.Obsolete("deprecated")>]
abstract member Divide : Java.Math.BigDecimal * int * Java.Math.RoundOptions -> Java.Math.BigDecimal
override this.Divide : Java.Math.BigDecimal * int * Java.Math.RoundOptions -> Java.Math.BigDecimal

Parameters

divisor

BigDecimal

value by which this BigDecimal is to be divided.

scale

Int32

scale of the BigDecimal quotient to be returned.

roundingMode

RoundOptions

rounding mode to apply.

Returns

this / divisor

Attributes
RegisterAttributeObsoleteAttribute

Exceptions

NullPointerException

if divisor == null.

IllegalArgumentException

if roundingMode is not a valid rounding mode.

ArithmeticException

if divisor == 0.

ArithmeticException

if roundingMode == ROUND_UNNECESSARY and rounding is
necessary according to the given scale.

Remarks

Java documentation for java.math.BigDecimal.divide(java.math.BigDecimal, 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