CMSIS-DSP: Fixed point division

| CMSIS-DSP Version 1.10.0 CMSIS DSP Software Library

- Main Page
- Usage and Description
- Reference

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Fixed point division
Fast Math Functions

## Functions

arm_status | arm_divide_q15 (q15_t numerator, q15_t denominator, q15_t *quotient, int16_t *shift)
| Fixed point division. More...
arm_status | arm_divide_q31 (q31_t numerator, q31_t denominator, q31_t *quotient, int16_t *shift)
| Fixed point division. More...

## Description

## Function Documentation

arm_status arm_divide_q15 | ( | q15_t | numerator,
|  | q15_t | denominator,
|  | q15_t * | quotient,
|  | int16_t * | shift
| ) |  |

Parameters

  [in] | numerator | Numerator
  [in] | denominator | Denominator
  [out] | quotient | Quotient value normalized between -1.0 and 1.0
  [out] | shift | Shift left value to get the unnormalized quotient

Returns
  error status

When dividing by 0, an error ARM_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.

arm_status arm_divide_q31 | ( | q31_t | numerator,
|  | q31_t | denominator,
|  | q31_t * | quotient,
|  | int16_t * | shift
| ) |  |

Parameters

  [in] | numerator | Numerator
  [in] | denominator | Denominator
  [out] | quotient | Quotient value normalized between -1.0 and 1.0
  [out] | shift | Shift left value to get the unnormalized quotient

Returns
  error status

When dividing by 0, an error ARM_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.