Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double.MIN_VALUE Used Erroneously (Possibly) #255

Open
deriven opened this issue Apr 5, 2018 · 0 comments
Open

Double.MIN_VALUE Used Erroneously (Possibly) #255

deriven opened this issue Apr 5, 2018 · 0 comments

Comments

@deriven
Copy link

deriven commented Apr 5, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant