CEP-0023: Extended Float Types¶
Draft
Draft proposal for floating-point primitive families beyond V1 f32 and f64.
Summary¶
Catalyst should eventually decide whether to add primitive float types such as f16, f80, or f128.
V1 keeps floating-point primitives to the accepted baseline and does not reserve additional float behavior without target, ABI, literal, and constant-evaluation rules.
Example¶
Possible future shape:
const sample: f16 = 0.5
const accumulator: f128 = sample.to_float(f128)
The proposal must define target support, literals, layout, ABI, conversions, and constant evaluation before these names become real primitive types.
Motivation¶
Extended float types are useful for interop, storage, DSP, numerical algorithms, and platform-specific ABI compatibility. They also differ widely by target support and lowering behavior.
Each added float type should have deliberate source, target, layout, ABI, literal, conversion, and comptime semantics.
Proposed Direction¶
The proposal should cover:
- which float types are added first;
- target support and unsupported-target diagnostics;
- literal suffixes and defaulting;
- conversion behavior with existing numeric types;
- ABI and layout reflection;
- constant-evaluation behavior;
- math-library and total-order support.
V1 Compatibility¶
V1 rejects unavailable primitive float names. Extended float arithmetic modes are separate from CEP-0013.