0

Is it safe to do mathematical calculations like if(d != 0.0), if (d < 0.005) below involving double?

#include <iostream>

int main()
{
   double d = 0.0;
   // Do some mathematical calculation.
   
   if(d != 0.0)
   {
       std::cout << "Hi";
   }

return 0;
}
Test
  • 534
  • 9

0 Answers0