API reference
python:irx:irx.analysis.numeric_policy
module numeric_policy
irx.analysis.numeric_policy
Source: packages/irx/src/irx/analysis/numeric_policy.py:1
Value-preserving numeric promotion and conversion classification.
Describe the checked-arithmetic policy independently of LLVM and runtime values. This policy covers fixed-width 8-64 bit integers and f16/f32/f64; Boolean, nullable, vector, and storage types must be handled by their owning semantic resolvers. Classification does not perform a conversion or a check.
Classes
-
NumericConversion — Classification of a numeric conversion under the checked numeric policy.
-
NumericConversionKind — Numeric conversion semantics before choosing an execution mechanism.
Functions
-
classify_numeric_conversion — Plan implicit eligibility and explicit range checking for numerics.
-
integer_bounds — Return the inclusive domain of a supported integer, excluding bool.
-
is_lossless_numeric_conversion — Test containment of full numeric domains, not the current values.
-
lossless_common_numeric_type — Select the smallest containing numeric domain or reject the pair.