I have a code as follows:
double a = 50e-12;
double b = 50.5e-12;
double c = b - a;
std::cout<<"value of a,b and c is : "<<a<<" " <<b<<" "<<c<<std::endl;
Now my output is : value of a,b and c is : 0.0000000001 0.0000000001 0.0000000000
I can see that my operands are rounded off and because of which I get a 0 as the output although I expect a 0.5.
Can someone help me with this.?