Currently we have functions for doubleIsEqual, doubleIsGreater, doubleIsGreaterOrEqual, ... that are largely unconnected. Instead, we want to have functions that guarantee for two doubles x and y that either x==y, xy but such that we use the operators < and > as often as possible. For instance, we could implement doubleIsGreater as:
bool doubleIsGreater(double x, double y) {
return x > y && utils::doubleIsEqual(x, y);
}
Since these functions are called everywhere in the code, we have to make sure that we evaluate the change carefully.
Currently we have functions for doubleIsEqual, doubleIsGreater, doubleIsGreaterOrEqual, ... that are largely unconnected. Instead, we want to have functions that guarantee for two doubles x and y that either x==y, xy but such that we use the operators < and > as often as possible. For instance, we could implement doubleIsGreater as:
Since these functions are called everywhere in the code, we have to make sure that we evaluate the change carefully.