Would it be safer to have a more symmetric form?
lp_types.h(220): #define my_reldiff(x, y) (((x) - (y)) / (1.0 +
fabs((REAL) (y))))
lp_lib.c(8146): ((pivot = fabs(my_reldiff(lp->rhs[0],
lp->longsteps->obj_last))) > lp->epssolution)) {
lp_lib.c(8457): testvalue = my_reldiff(testvalue, refvalue);
lp_lib.c(8612): (my_chsign(is_maxim(lp),
my_reldiff(lp->best_solution[0],lp->bb_limitOF)) < -epsvalue)) {
lp_lib.c(8640): 100.0*fabs(my_reldiff(solution[0], lp->bb_limitOF)));
lp_lib.c(8690): diff = my_reldiff(value, test);
lp_lib.c(8753): diff = my_reldiff((value+1)/hold, (test+1)/hold);
I would think for aesthetics, the odd symmetry diff( x,y) = - diff(y,x)
should be retained by
the relative diff function.
sym_reldiff(x,y) (((x) - (y)) / (1.0 + ( fabs((REAL) (x)) + fabs((REAL)
(y)))/2.0 ))
I think the current "y" asymmetry us needed only for the solution test in
8612.
I believe the swap of test and value in 8457 and 8690 might show the
potential confusion
In use of the current un symmetric form..
William