exp3c5x_5.c

来自「用dsp解压mp3程序的算法」· C语言 代码 · 共 26 行

C
26
字号
/*****************************************************************
*  exp3c5x_5.c - C program for testing rounding used in
*                Section 3.7.3.5
*****************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <intrindefs.h>

/*****************************************************************
*    Define variable arrays, define and clear variables
*****************************************************************/

int num[2] = {8520, 26214};   /* real values are 0.26, 0.79 */
int y1, y2;

void main()
{
  /* Understand the difference between _smpy and _smpyr */
  /* OVM and FRCT are both set */
	
  y1 = _smpyr(num[0],num[1]);  // with rounding
  y2 = _smpy(num[0], num[1]);  // without rounding
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?