I have a question that might save a lot of debugging time for many people...
Given a function:
void my_func(double value)
Is there any difference between the 2 following code lines?
double my_value = 1 - value;
and
double my_value = 1.0 - value;
I.e. given that value
is double
, if I use 1 - value
, can I feel safe that the result will be the correct real number, like when using 1.0 - value
?