scalar.ldexpf
← scalar dialect
Scale input by two raised to the signed i32 exponent, rounding once to the result format with round-to-nearest, ties-to-even. Signed zeros and infinities are preserved, NaNs propagate, and subnormal inputs and results are supported. Overflow follows the result format's floating-point conversion semantics.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, SafeToSpeculate |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
input |
float |
required |
— |
| Operand |
exponent |
i32 |
required |
— |
| Result |
result |
float |
required |
— |
Verification constraints
Examples
%scaled = scalar.ldexpf %input, %exponent : f64, i32