Runtime v2.81 · Updated Sep 30, 2026

float

Cast value to floating-point number.

Syntax

float(value, /)

Parameters

NameDescription
valueInt | Float | Boolean | String
Value to cast
Required · Positional only
No default

Returns

Float — Converted floating-point value.

Behavior / side effects

Cast value to floating-point number.

Execution

  • Blocking: No
  • Thread safety: Use separate objects per flow
  • Parallel execution: Yes

Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.

Example

score = float("0.85")
if score > 0.8:
    text("ok")

Errors / limitations

No additional limitations documented; follow the parameter and behavior contract above.

Related APIs

None