Sqrt
R2026bLibraries:
Embedded Coder Support Package for Qualcomm Hexagon Processors /
Hexagon /
Math
Description
The Sqrt block computes the square root of a fixed-point input signal. The block supports fixed-point inputs and generates code that integrates with Qualcomm® Hexagon® library (QHL) for optimized execution.
Use this block when you want to simulate results to match QHL-generated code results for square root operations on Hexagon targets. The block implements a QHL-aligned algorithm so that model behaviour and generated code produce consistent results.
For fixed-point inputs, the block expects input values in unsigned Q0 format (16-bit) and produces output values in unsigned Q8.8 format. This scaling reflects the behaviour of the underlying QHL APIs. The block supports scalar and vector inputs and applies the element-wise square root operation.
The block computes the square root using a QHL implementation that first estimates the inverse square root and then refines the result using one Newton–Raphson iteration. The algorithm scales the result to produce an output in Q8.8 fixed-point format and ensures consistency between simulation and generated code.
You can use this block for fixed-point modeling, code generation, and execution on Qualcomm Hexagon DSP targets.
Examples
Ports
Input
Output
Extended Capabilities
Version History
Introduced in R2026b
