Share via


BigDecimal.FloatValue Method

Definition

Converts this BigDecimal to a float.

[Android.Runtime.Register("floatValue", "()F", "GetFloatValueHandler", ApiSince=24)]
public override float FloatValue ();
[<Android.Runtime.Register("floatValue", "()F", "GetFloatValueHandler", ApiSince=24)>]
override this.FloatValue : unit -> single

Returns

A float corresponding to this.

Attributes

Remarks

Converts this BigDecimal to a float. If the BigDecimal is out of the possible range for a float (32-bit signed floating point) result then an ArithmeticException is thrown.

The float produced is identical to result of expressing the BigDecimal as a String and then converting it using the Float(String) constructor; this can result in values of Float.NEGATIVE_INFINITY or Float.POSITIVE_INFINITY.

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

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