Fixed point division
- RISCV_DSP_ATTRIBUTE riscv_status riscv_divide_q15 (q15_t numerator, q15_t denominator, q15_t *quotient, int16_t *shift)
- RISCV_DSP_ATTRIBUTE riscv_status riscv_divide_q31 (q31_t numerator, q31_t denominator, q31_t *quotient, int16_t *shift)
- group divide
Functions
- RISCV_DSP_ATTRIBUTE riscv_status riscv_divide_q15 (q15_t numerator, q15_t denominator, q15_t *quotient, int16_t *shift)
Fixed point division.
When dividing by 0, an error RISCV_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.
- Parameters
numerator – [in] Numerator
denominator – [in] Denominator
quotient – [out] Quotient value normalized between -1.0 and 1.0
shift – [out] Shift left value to get the unnormalized quotient
- Returns
error status
- RISCV_DSP_ATTRIBUTE riscv_status riscv_divide_q31 (q31_t numerator, q31_t denominator, q31_t *quotient, int16_t *shift)
Fixed point division.
When dividing by 0, an error RISCV_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.
- Parameters
numerator – [in] Numerator
denominator – [in] Denominator
quotient – [out] Quotient value normalized between -1.0 and 1.0
shift – [out] Shift left value to get the unnormalized quotient
- Returns
error status