Am I going crazy! - page 2

 
Mladen Rakic:

is the same thing as 

Ahh yess, correct. I wrote it wrong... lol. 

 

You are looking for this one:


   bool Piv1()
   {
   if( (1.3898 == 1.1232) || (1.4736 == 1.1232) )
      {
      return(true);
      }
      else return(false);
      
   }
 
Laszlo Tormasi:

You are looking for this one:


yep that's it

 
//+------------------------------------------------------------------+
   bool Piv1()
   {
   if(1.3898 || 1.4736 == 1.1232)
      {
      return(true);
      }
      else return(false);
      
   }

although incorrect it should be

//+------------------------------------------------------------------+
   bool Piv1()
   {
   if(1.3898 == 1.1232 || 1.4736 == 1.1232)
      {
      return(true);
      }
      else return(false);
      
   }

When comparing doubles take note of the link provided by Whroeder.

 
Thanks guys for all your comments! Funny, I have a couple of programming books and I realise how inadequate it is explained in them. Thanks!
Reason: