Java.Math.BigDecimal.FloatValue Method
Returns this BigDecimal as a float value.

Syntax

[Android.Runtime.Register("floatValue", "()F", "GetFloatValueHandler")]
public override float FloatValue ()

Returns

Documentation for this section has not yet been entered.

Remarks

Returns this BigDecimal as a float value. If this is too big to be represented as an float, then Float.POSITIVE_INFINITY or Float.NEGATIVE_INFINITY is returned.

Note, that if the unscaled value has more than 24 significant digits, then this decimal cannot be represented exactly in a float variable. In this case the result is rounded.

For example, if the instance x1 = new BigDecimal("0.1") cannot be represented exactly as a float, and thus x1.equals(new BigDecimal(x1.floatValue()) returns false for this case.

Similarly, if the instance new BigDecimal(16777217) is converted to a float, the result is 1.6777216E7.

[Android Documentation]

Requirements

Namespace: Java.Math
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1