我正在尝试编写此程序以返回非正规值,但是出现以下错误。谁能帮我解决此错误:
support.c: In function 'is_denormal':
support.c:50:34: error: expected expression before ')' token
在此代码中:
#include <stdio.h>
#include <stdlib.h>
int is_denormal( double x)
{
union dp_item N1;
N1.drep = x;
union dp_item N2;
N2.drep = x;
N1.irep = absolute(N1.drep, x*);
N1.irep = N1.irep >> 52;
if (N1.irep == 0x0ULL)
{
N2.irep = N2.irep << 12;
if (N2.irep != 0x0ULL)
{return 1;}
return 0;
}
else {return 0;}
}
这是绝对函数:
double absolute( double x, double y* )
{
union dp_item N;
N.drep = x;
N.irep = N.irep & 0x7FFFFFFFFFFFFFFFULL;
return N.drep;
}
谢谢
最佳答案
这行:
N1.irep = absolute(N1.drep, x*);
语法无效。那
*
是做什么用的?关于c - C中“)”标记之前的预期表达式错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19921169/