if the jsd less than 10e-6, then return zero.