Files
Decodal/doc/manual/source/language/value/float.md
T

464 B

Float

Float is the primitive type constraint for floating-point values.

Examples

ratio = Float;
threshold = Float default 0.5;

Relationship to Int

Int and Float are distinct primitive type constraints. A Float constraint requires a concrete Float, and an Int constraint requires a concrete Int.

Arithmetic and comparison expressions can treat Int and Float as numeric values. Mixed arithmetic produces a Float result.