<div class='sourceset sourceset-android'>Android</div>

```kotlin
public abstract class RemoteFloat internal constructor() : BaseRemoteState<Float>()
```

Abstract base class for all remote float representations.

`RemoteFloat` represents a floating-point value that can be a constant, a possibly named
variable, or a dynamic expression (e.g., an arithmetic operation).

## Functions

<h2 id="toremoteint">toRemoteInt</h2>

```kotlin
public fun toRemoteInt(): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the result of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) converted to Int.

<hr class="docs-overload-divider">

<h2 id="toremotestring-before-after-flags">toRemoteString</h2>

```kotlin
public fun toRemoteString(
        before: Int,
        after: Int = 2,
        flags: Int = PAD_AFTER_ZERO,
    ): RemoteString
```

Returns a [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) that converts the result of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) with specified
formatting.

#### Parameters

| | |
| --- | --- |
| before | The number of digits to show before the decimal point. |
| after | The number of digits to show after the decimal point (defaults to 2). |
| flags | Formatting flags for the string conversion (defaults to `TextFromFloat.PAD_AFTER_ZERO`). |

#### Returns

| | |
| --- | --- |
|  | A [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the formatted float. |

<hr class="docs-overload-divider">

<h2 id="toremotestring-format">toRemoteString</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun toRemoteString(
        format: android.icu.text.DecimalFormat = DefaultDecimalFormat
    ): RemoteString
```

Returns a [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) that evaluates to the result of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) formatted
according to the provided `android.icu.text.DecimalFormat`.

This method maps the localized ICU `android.icu.text.DecimalFormat` configuration (including
padding, rounding, and digit constraints) to a remote-compatible string representation. It
specifically handles complex padding logic and threshold-based selections to ensure the
formatted output remains consistent when evaluated on the remote target.

#### Parameters

| | |
| --- | --- |
| format | The ICU `android.icu.text.DecimalFormat` to use for determining formatting options like separators, grouping, and padding width. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the formatted float. |

<hr class="docs-overload-divider">

<h2 id="toremotestring-format-2">toRemoteString</h2>

```kotlin
public fun toRemoteString(format: DecimalFormat): RemoteString
```

Returns a [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) that evaluates to the result of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) formatted
according to the provided `DecimalFormat`.

This method maps the localized `DecimalFormat` symbols (such as separators and grouping
sizes) and configuration (such as padding and rounding) to a remote-compatible string
representation.

#### Parameters

| | |
| --- | --- |
| format | The `DecimalFormat` to use for determining separators, grouping, and padding. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the formatted float. |

<hr class="docs-overload-divider">

<h2 id="unaryminus">unaryMinus</h2>

```kotlin
public operator fun unaryMinus(): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to the negative of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat).

<hr class="docs-overload-divider">

<h2 id="rem-v">rem</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun rem(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) modulo `v`.

<hr class="docs-overload-divider">

<h2 id="rem-v-2">rem</h2>

```kotlin
public operator fun rem(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) modulo `v`.

<hr class="docs-overload-divider">

<h2 id="min-v">min</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun min(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to minimum of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) and `v`.

<hr class="docs-overload-divider">

<h2 id="min-v-2">min</h2>

```kotlin
public fun min(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to minimum of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) and `v`.

<hr class="docs-overload-divider">

<h2 id="plus-v">plus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun plus(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) plus `v`.

<hr class="docs-overload-divider">

<h2 id="plus-v-2">plus</h2>

```kotlin
public operator fun plus(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) plus `v`.

<hr class="docs-overload-divider">

<h2 id="minus-v">minus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun minus(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) minus `v`.

<hr class="docs-overload-divider">

<h2 id="minus-v-2">minus</h2>

```kotlin
public operator fun minus(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) minus `v`.

<hr class="docs-overload-divider">

<h2 id="times-v">times</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun times(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) times `v`.

<hr class="docs-overload-divider">

<h2 id="times-v-2">times</h2>

```kotlin
public operator fun times(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) times `v`.

<hr class="docs-overload-divider">

<h2 id="div-v">div</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun div(v: Float): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) div `v`.

<hr class="docs-overload-divider">

<h2 id="div-v-2">div</h2>

```kotlin
public operator fun div(v: RemoteFloat): RemoteFloat
```

Returns a new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that evaluates to this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) div `v`.

<hr class="docs-overload-divider">

<h2 id="createreference-forceremote">createReference</h2>

```kotlin
@JvmOverloads
    @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun createReference(forceRemote: Boolean = false): RemoteFloat
```

Returns a [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) that is a reference of this RemoteFloat.

This is temporarily useful because the floatArray has a maximum size.

#### Parameters

| | |
| --- | --- |
| forceRemote | If true, forces the creation of a remote reference even if the value is constant. |

<hr class="docs-overload-divider">

<h2 id="eq-b">eq</h2>

```kotlin
public infix fun eq(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is equal to the value of this
[RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="ne-b">ne</h2>

```kotlin
public infix fun ne(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is not equal to the value of this
[RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="lt-b">lt</h2>

```kotlin
public infix fun lt(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is less than the value of this
[RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="le-b">le</h2>

```kotlin
public infix fun le(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is less than or equal to the value
of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="gt-b">gt</h2>

```kotlin
public infix fun gt(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is greater than the value of this
[RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="ge-b">ge</h2>

```kotlin
public infix fun ge(b: RemoteFloat): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is greater than or equal to the
value of this [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) or `false` otherwise.

## Companion Object

#### Methods

<hr class="docs-overload-divider">

<h2 id="invoke-float">invoke</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public operator fun invoke(float: Float): RemoteFloat
```

Creates a [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) from a constant `Float` value.

#### Parameters

| | |
| --- | --- |
| float | The value to wrap. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) representing the given constant or encoded id. |

<hr class="docs-overload-divider">

<h2 id="createnamedremotefloat-name-defaultvalue-domain">createNamedRemoteFloat</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        @JvmStatic
        public fun createNamedRemoteFloat(
            name: String,
            defaultValue: Float,
            domain: RemoteState.Domain = RemoteState.Domain.User,
        ): RemoteFloat
```

Creates a named [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) with an initial value. This allows referring to a float by
a symbolic name in the remote document. Named remote ints can be set via
AndroidRemoteContext.setNamedFloat.

#### Parameters

| | |
| --- | --- |
| name | The name of the remote float. |
| defaultValue | The initial value of the remote float. |
| domain | The domain of the named float (defaults to [RemoteState.Domain.User](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/RemoteState.Domain.User)). This helps avoid name collisions. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) representing the named float. |

<hr class="docs-overload-divider">

<h2 id="createnamedremotefloatexpression-name-domain-expression">createNamedRemoteFloatExpression</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        @JvmStatic
        public fun createNamedRemoteFloatExpression(
            name: String,
            domain: RemoteState.Domain = RemoteState.Domain.User,
            expression: RemoteFloatContext.() -> RemoteFloat,
        ): RemoteFloat
```