Skip to content

Double.MIN_VALUE Used Erroneously (Possibly) #255

@deriven

Description

@deriven

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions