long double i, j, ans;
scanf("%Lf %Lf", &i, &j);
ans=i*j;
printf("%Lf %Lf", ans, i*j);
i/p -> 1 1
o/p -> -2.000000 -2.000000
expected o/p -> 1.000000 1.000000
Please explain this behaviour, and where is it going wrong and how can we come over it? If the o/p appx to close to 1 also acceptable.
FYI: long double format specifier I tried Lf, lf, LF and llf according to other StackOverflow post.