printf("Elements of vector U:\n");
rprint_vector(u, n);
double vt = dasum_(&n, u, &incx);
printf("vt = %lf\n", vt);
if (vt == 0)
printf("yes vt = 0\n");
else
printf("No vt != 0\n");
Results :
Elements of vector U:
------------
0.000000
0.000000
-0.000000
0.000000
------------
vt = 0.000000
No vt != 0
even though the variable vt equal to 0 the condition is not satisfied. where is the problem!!