Replace compareNumbers() with equals() and improve numerical tolerance handling in test helpers.