[petsc-dev] wrong PETSc code, please read the PETSc style guide
    Barry Smith 
    bsmith at mcs.anl.gov
       
    Mon Sep 17 20:27:55 CDT 2012
    
    
  
On Sep 17, 2012, at 8:19 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Mon, Sep 17, 2012 at 8:17 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Also never if (i == 0)   use if (!i)
> 
> Floating point exact equality (rare) is an exception to this rule.
   Huh?
        So it is ok to do  if (fl == 0.0)   but not (!fl)?  How are they different?
    Barry
    
    
More information about the petsc-dev
mailing list