MCPcopy Create free account
hub / github.com/WinVector/Logistic / relDiff

Method relDiff

test/com/winvector/logistic/TestLRPath.java:70–77  ·  view source on GitHub ↗
(double a, double b)

Source from the content-addressed store, hash-verified

68 }
69
70 private double relDiff(double a, double b) {
71 final double diff = Math.abs(a-b);
72 if(diff<=0.0) {
73 return 0.0;
74 } else {
75 return 2.0*diff/(Math.abs(a)+Math.abs(b));
76 }
77 }
78
79 /**
80 * essentially the same loop structure as VariableEncodings.formatSoln. So double calculating here confirms

Callers 1

confirmEffectCalcMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected