API reference

python:astx:astx.literals.numeric.LiteralFloat

class LiteralFloat

LiteralFloat(value: str | Decimal, loc: SourceLocation = NO_SOURCE_LOCATION)

Source: packages/astx/src/astx/literals/numeric.py:672

Exact decimal floating literal awaiting semantic contextualization.

Accept decimal text or Decimal, never an already-rounded Python float. The finite Decimal payload is independent of the active decimal context. Analysis must preserve it and record the chosen binary format and rounded constant in semantic metadata. Typed LiteralFloat32 and related nodes instead express an explicitly chosen binary format.

Attributes

Methods

Attributes

Search documentation

Type to search.