2^x (Base-2 Exponential) Special-Function Approximation
Fast, reduced-precision hardware approximation of 2 raised to a floating-point power.
Vendor-Neutral Definition
d ≈ 2^a; precision is hardware- and instruction-specific.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler
translations.
equivalent with restrictions
Both provide a fast, reduced-precision hardware approximation of 2^x.
| Property | NVIDIA PTX | AMDGPU |
|---|---|---|
| Instruction | ex2 | v_exp_f32 |
| ISA Layer | Virtual | Native |
| Data Types | - | f32 |
| Version / Target Introduced | PTX ISA 1.0 | gfx1100 |
Important Differences
- Approximation error bounds (max ULP) are hardware-generation-specific on both vendors and are not guaranteed to match; do not assume bit-identical results across vendors even when both are described as 'approx'.
Source Evidence
- Parallel Thread Execution ISA ↗ - NVIDIA Corporation
- User Guide for AMDGPU Backend ↗ - LLVM Project
Verification method: documentation