📄 mfr.c
字号:
**
** Description :
** The div_s function divides two fractional numbers (x / y);
** x and y must be positive and y must be greater than or
** equal to x.
** Parameters :
** NAME - DESCRIPTION
** x - The dividend of the division.
** y - The divisor for the division.
** Returns :
** --- - The div_s function returns the quotient
** of the division calculation.
** ===================================================================
*/
/*
Frac16 MFR_div_s(Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_div_ls (bean DSP_Func_MFR)
**
** This method can be used also under name "div_ls"
**
** Description :
** The div_ls function divides two fractional numbers (x / y);
** x and y must be positive and y must be greater than or
** equal to x.
** Parameters :
** NAME - DESCRIPTION
** x - The dividend of the division.
** y - The divisor for the division.
** Returns :
** --- - The div_ls function returns the
** quotient of the division calculation.
** ===================================================================
*/
/*
Frac16 MFR_div_ls(Frac32 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_L_deposit_l (bean DSP_Func_MFR)
**
** This method can be used also under name "L_deposit_l"
**
** Description :
** The L_deposit_l function places a 16-bit fractional value
** into the least significant 16 bits of the 32-bit
** fractional output value and sign extends the most
** significant 16 bits.
** Parameters :
** NAME - DESCRIPTION
** x - The input data value.
** Returns :
** --- - The function returns a 32-bit
** fractional value.
** ===================================================================
*/
/*
Frac32 MFR_L_deposit_l(Frac16 x)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_extract_l (bean DSP_Func_MFR)
**
** This method can be used also under name "extract_l"
**
** Description :
** The extract_l function extracts the least significant 16
** bits from the 32-bit fractional value.
** Parameters :
** NAME - DESCRIPTION
** x - The input data value.
** Returns :
** --- - The extract_l function returns the
** extracted value as a 16-bit fractional
** number.
** ===================================================================
*/
/*
Frac16 MFR_extract_l(Frac32 x)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_extract_h (bean DSP_Func_MFR)
**
** This method can be used also under name "extract_h"
**
** Description :
** The extract_h function extracts the most significant 16
** bits from the 32-bit fractional value.
** Parameters :
** NAME - DESCRIPTION
** x - The input data value.
** Returns :
** --- - The extract_h function returns the
** extracted value as a 16-bit fractional
** number.
** ===================================================================
*/
/*
Frac16 MFR_extract_h(Frac32 x)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_mac_r (bean DSP_Func_MFR)
**
** This method can be used also under name "mac_r"
**
** Description :
** The mac function multiplies two 16-bit fractional input
** values (x * y) and adds the 32-bit result to w.
** Parameters :
** NAME - DESCRIPTION
** w - The input value used with the addition.
** x - The first input data value for the
** multiplication.
** y - The second input data value for the
** multiplication.
** Returns :
** --- - The function returns the result of the
** calculation (x * y) + w.
** ===================================================================
*/
/*
Frac16 MFR_mac_r(Frac32 w,Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_msu_r (bean DSP_Func_MFR)
**
** This method can be used also under name "msu_r"
**
** Description :
** The msu function multiplies x by y and subtracts the
** 32-bit result from w.
** Parameters :
** NAME - DESCRIPTION
** w - The input value used with the
** subtraction.
** x - The first input data value for the
** addition.
** y - The second input data value for the
** addition.
** Returns :
** --- - The function returns the result of the
** calculation w - (x + y).
** ===================================================================
*/
/*
Frac16 MFR_msu_r(Frac32 w,Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_mult (bean DSP_Func_MFR)
**
** This method can be used also under name "mult"
**
** Description :
** This multiplication function multiply two fractional
** input values and return the result.
** Parameters :
** NAME - DESCRIPTION
** x - The first input data value.
** y - The second input data value.
** Returns :
** --- - The mult function returns returns the
** result of the fractional multiplication.
** ===================================================================
*/
/*
Frac16 MFR_mult(Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_mult_r (bean DSP_Func_MFR)
**
** This method can be used also under name "mult_r"
**
** Description :
** This multiplication function multiply two fractional
** input values and return the result. The function differs
** from mult in that function rounds the result, whereas
** mult truncates the result to 16bits.
** Parameters :
** NAME - DESCRIPTION
** x - The first input data value.
** y - The second input data value.
** Returns :
** --- - The mult function returns returns the
** result of the fractional multiplication.
** ===================================================================
*/
/*
Frac16 MFR_mult_r(Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_L_mac (bean DSP_Func_MFR)
**
** This method can be used also under name "L_mac"
**
** Description :
** The mac function multiplies two 16-bit fractional input
** values (x * y) and adds the 32-bit result to w.
** Parameters :
** NAME - DESCRIPTION
** w - The input value used with the addition.
** x - The first input data value for the
** multiplication.
** y - The second input data value for the
** multiplication.
** Returns :
** --- - The function returns the result of the
** calculation (x * y) + w.
** ===================================================================
*/
/*
Frac32 MFR_L_mac(Frac32 w,Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_L_msu (bean DSP_Func_MFR)
**
** This method can be used also under name "L_msu"
**
** Description :
** The msu function multiplies x by y and subtracts the
** 32-bit result from w.
** Parameters :
** NAME - DESCRIPTION
** w - The input value used with the addition.
** x - The first input data value for the
** addition.
** y - The second input data value for the
** addition.
** Returns :
** --- - The function returns the result of the
** calculation w - (x + y).
** ===================================================================
*/
/*
Frac32 MFR_L_msu(Frac32 w,Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_L_mult (bean DSP_Func_MFR)
**
** This method can be used also under name "L_mult"
**
** Description :
** This multiplication function multiply two fractional
** input values and return the result.
** Parameters :
** NAME - DESCRIPTION
** x - The first input data value.
** y - The second input data value.
** Returns :
** --- - The mult function returns returns the
** result of the fractional multiplication.
** ===================================================================
*/
/*
Frac32 MFR_L_mult(Frac16 x,Frac16 y)
{
This method is implemented by Metrowerks
}
*/
/*
** ===================================================================
** Method : MFR_L_mult_ls (bean DSP_Func_MFR)
**
** This method can be used also under name "L_mult_ls"
**
** Description :
** This multiplication function multiply two fractional
** input values and return the result. The function differs
** from mult in that function rounds the result, whereas
** mult truncates the result to 16bits.
** Parameters :
** NAME - DESCRIPTION
** x - The first input data value.
** y - The second input data value.
** Returns :
** --- - The mult function returns returns the
** result of the fractional multiplication.
** ===================================================================
*/
/*
Frac32 MFR_L_mult_ls(Frac32 x,Frac16 y)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -