`If statements' are nearly always the cause of most development bugs.
There is a multitude of ways they can be incorrectly used. In general
you should attempt to use them with care
using `if .. then .. else ' constructs helps.

Try to minimise the
total number, every new statement generates a new branch of execution
possibilities increasing the overall number of ways that the program
can execute by another factor of two (LESS PATHS = LESS TESTING).

Algorithms should never be written so that they are sensitive to
arbitrary thresholds, they should be based on `soft' statistical
methods if possible. This generaly follows directly if an algorithm
is designed using a statistical methodology (see Tina memo 2002-005)
which takes due account of accuracy of data.

NaN variables will always cause if statements to evaluate as false. Given
that NaN are generally generated due to division by zero you can attempt to
write software so that this operates in your favour. Always consider
potential over-flow and under-flow conditions and take them into account.

Never compare floating point or double variables for equivalence

if (x==value){...}

As numerical in-precision will probably ensure unreliable testing.

Watch out for pointer comparision of char strings as an incorrect
substitute for strcmp().