API reference

python:irx:irx.analysis.numeric_policy.lossless_common_numeric_type

function lossless_common_numeric_type

lossless_common_numeric_type(lhs: astx.DataType, rhs: astx.DataType) -> astx.DataType | None

Source: packages/irx/src/irx/analysis/numeric_policy.py:142

Select the smallest containing numeric domain or reject the pair.

Preserve matching integer signedness; mixed signed/unsigned operands require a containing signed type. Integer-only operations never acquire a floating result. Mixed floating operands require exact conversion of the entire integer domain. Unsupported types fail closed.

Parameters

Returns

Type: astx.DataType | None

Search documentation

Type to search.