Tinkered with C version of test to treat numbers close to zero as zero