I have a question that can save a lot of debugging time for many people ...
For function:
void my_func(double value)
Is there a difference between the next two lines of code?
double my_value = 1 - value;
and
double my_value = 1.0 - value;
those. that value
is double
, if I use 1 - value
, can I feel safe that the result will be the correct real number, for example, when using 1.0 - value
?
source share