我正在尝试编写此程序以返回非规范值,但出现如下所示的错误。谁能帮我解决这个错误:
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;
}
谢谢