⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sinc.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//*********************** self documentation **********************//*****************************************************************************SINC - Return SINC(x) for as floats or as doublesfsinc		return float value of sinc(x) for x input as a floatdsinc		return double precision sinc(x) for double precision x******************************************************************************Function Prototype:float fsinc (float x);double dsinc (double x);******************************************************************************Input:x		value at which to evaluate sinc(x)Returned: 	sinc(x)******************************************************************************Notes:    sinc(x) = sin(PI*x)/(PI*x) ******************************************************************************Author:  Dave Hale, Colorado School of Mines, 06/02/89*****************************************************************************//**************** end self doc ********************************/#include "cwp.h"float fsinc (float x)/*****************************************************************************Return sinc(x) = sin(PI*x)/(PI*x) (float version)******************************************************************************Input:x		value at which to evaluate sinc(x)Returned: 	sinc(x)******************************************************************************Author:  Dave Hale, Colorado School of Mines, 06/02/89*****************************************************************************/{	float pix;	if (x==0.0) {		return 1.0;	} else {		pix = PI*x;		return sin(pix)/pix;	}}double dsinc (double x)/*****************************************************************************Return sinc(x) = sin(PI*x)/(PI*x) (double version)******************************************************************************Input:x		value at which to evaluate sinc(x)Returned:	sinc(x)******************************************************************************Author:  Dave Hale, Colorado School of Mines, 06/02/89*****************************************************************************/{	double pix;	if (x==0.0) {		return 1.0;	} else {		pix = PI*x;		return sin(pix)/pix;	}}

⌨️ 快捷键说明

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