encog-java-core icon indicating copy to clipboard operation
encog-java-core copied to clipboard

Double.MIN_VALUE Used Erroneously (Possibly)

Open deriven opened this issue 6 years ago • 0 comments

I forked the code because I noticed a few places that mistakenly use Double.MIN_VALUE for comparison. But Double.MIN_VALUE is not the lowest negative value for double. Double.NEGATIVE_INFINITY is.

I say "possibly" because I'm not 100% it makes a difference in every possibility. (14 files total.) Some places use it for this.max while others use it for this.actualHigh.

Here's an example where it seems absolutely incorrect. https://github.com/encog/encog-java-core/blob/master/src/main/java/org/encog/neural/cpn/CPN.java#L150-L152

I can create a PR for this if you agree.

deriven avatar Apr 05 '18 22:04 deriven