다음을 통해 공유


BigDecimal.Divide Method

Definition

Overloads

Divide(BigDecimal, Int32, RoundOptions)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a given scale and rounding mode.

Divide(BigDecimal, RoundOptions)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a rounding mode.

Divide(BigDecimal, MathContext)

Returns a BigDecimal whose value is this/rhs.

Divide(BigDecimal)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic.

Divide(BigDecimal, Int32, RoundOptions)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a given scale and rounding mode.

[Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;II)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_IIHandler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Divide (Android.Icu.Math.BigDecimal? rhs, int scale, Android.Icu.Math.RoundOptions round);
[<Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;II)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_IIHandler", ApiSince=24)>]
abstract member Divide : Android.Icu.Math.BigDecimal * int * Android.Icu.Math.RoundOptions -> Android.Icu.Math.BigDecimal
override this.Divide : Android.Icu.Math.BigDecimal * int * Android.Icu.Math.RoundOptions -> Android.Icu.Math.BigDecimal

Parameters

rhs
BigDecimal

The BigDecimal for the right hand side of the division.

scale
Int32

The int scale to be used for the result.

round
RoundOptions

The int rounding mode to be used for the division (see the MathContext class).

Returns

A plain BigDecimal whose value is this/rhs, using fixed point arithmetic and the specified rounding mode.

Attributes

Remarks

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a given scale and rounding mode.

The same as #divide(BigDecimal, MathContext), where the BigDecimal is rhs, new MathContext(0, MathContext.PLAIN, false, round), except that the length of the decimal part (the scale) to be used for the result is explicit rather than being taken from this.

The length of the decimal part (the scale) of the result will be the same as the scale of the current object, if the latter were formatted without exponential notation.

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

Divide(BigDecimal, RoundOptions)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a rounding mode.

[Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;I)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_IHandler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Divide (Android.Icu.Math.BigDecimal? rhs, Android.Icu.Math.RoundOptions round);
[<Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;I)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_IHandler", ApiSince=24)>]
abstract member Divide : Android.Icu.Math.BigDecimal * Android.Icu.Math.RoundOptions -> Android.Icu.Math.BigDecimal
override this.Divide : Android.Icu.Math.BigDecimal * Android.Icu.Math.RoundOptions -> Android.Icu.Math.BigDecimal

Parameters

rhs
BigDecimal

The BigDecimal for the right hand side of the division.

round
RoundOptions

The int rounding mode to be used for the division (see the MathContext class).

Returns

A plain BigDecimal whose value is this/rhs, using fixed point arithmetic and the specified rounding mode.

Attributes

Remarks

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic and a rounding mode.

The same as #divide(BigDecimal, int, int), where the BigDecimal is rhs, and the second parameter is this.scale(), and the third is round.

The length of the decimal part (the scale) of the result will therefore be the same as the scale of the current object, if the latter were formatted without exponential notation.

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

Divide(BigDecimal, MathContext)

Returns a BigDecimal whose value is this/rhs.

[Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;Landroid/icu/math/MathContext;)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_Landroid_icu_math_MathContext_Handler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Divide (Android.Icu.Math.BigDecimal? rhs, Android.Icu.Math.MathContext? set);
[<Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;Landroid/icu/math/MathContext;)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_Landroid_icu_math_MathContext_Handler", ApiSince=24)>]
abstract member Divide : Android.Icu.Math.BigDecimal * Android.Icu.Math.MathContext -> Android.Icu.Math.BigDecimal
override this.Divide : Android.Icu.Math.BigDecimal * Android.Icu.Math.MathContext -> Android.Icu.Math.BigDecimal

Parameters

rhs
BigDecimal

The BigDecimal for the right hand side of the division.

set
MathContext

The MathContext arithmetic settings.

Returns

A BigDecimal whose value is this/rhs.

Attributes

Remarks

Returns a BigDecimal whose value is this/rhs.

Implements the division (<b>/</b>) operator (as defined in the decimal documentation, see BigDecimal class header), and returns the result as a BigDecimal object.

Java documentation for android.icu.math.BigDecimal.divide(android.icu.math.BigDecimal, android.icu.math.MathContext).

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

Divide(BigDecimal)

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic.

[Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_Handler", ApiSince=24)]
public virtual Android.Icu.Math.BigDecimal? Divide (Android.Icu.Math.BigDecimal? rhs);
[<Android.Runtime.Register("divide", "(Landroid/icu/math/BigDecimal;)Landroid/icu/math/BigDecimal;", "GetDivide_Landroid_icu_math_BigDecimal_Handler", ApiSince=24)>]
abstract member Divide : Android.Icu.Math.BigDecimal -> Android.Icu.Math.BigDecimal
override this.Divide : Android.Icu.Math.BigDecimal -> Android.Icu.Math.BigDecimal

Parameters

rhs
BigDecimal

The BigDecimal for the right hand side of the division.

Returns

A plain BigDecimal whose value is this/rhs, using fixed point arithmetic.

Attributes

Remarks

Returns a plain BigDecimal whose value is this/rhs, using fixed point arithmetic.

The same as #divide(BigDecimal, int), where the BigDecimal is rhs, and the rounding mode is MathContext#ROUND_HALF_UP.

The length of the decimal part (the scale) of the result will be the same as the scale of the current object, if the latter were formatted without exponential notation.

Java documentation for android.icu.math.BigDecimal.divide(android.icu.math.BigDecimal).

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