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

📄 frexp.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#ifndef lintstatic	char sccsid[] = "@(#)frexp.c 1.1 92/07/30 SMI"; /* from UCB 5.2 3/9/86 */#endif/* * the call *	x = frexp(arg,&exp); * must return a double fp quantity x which is <1.0 * and the corresponding binary exponent "exp". * such that *	arg = x*2^exp */doublefrexp(x, i)	double x;	int *i;{	int neg, j;	j = 0;	neg = 0;	if (x<0) {		x = -x;		neg = 1;	}	if (x>=1.0)		while (x>=1.0) {			j = j+1;			x = x/2;		}	else if (x < 0.5 && x != 0.0)		while(x<0.5) {			j = j-1;			x = 2*x;		}	*i = j;	if(neg)		x = -x;	return (x);}

⌨️ 快捷键说明

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