Menu

#1 Infinite loop in Query Performer

1.0
closed
Lazaros
bug (2)
2014-08-27
2014-08-27
Lazaros
No

In QueryPerformer (src/org/grire/BagOfVisualWords/Functions/QueryPerformer.java) loop in line 74 tends to be infinite loop for reasons that are nicely explained in the answer to the second part of this SO question:

http://stackoverflow.com/questions/5852611/java-float-min-value-and-float-min-normal

The way I made it work is instead of Float.MIN_VALUE I put 0.0000001 (stupid magic number, but it's arbitrary anyway). The same applies to lines 80, 96, 105.

Discussion

  • Lazaros

    Lazaros - 2014-08-27

    Addition with Float.MIN_VALUE replaced with Math.nextUp()

     
  • Lazaros

    Lazaros - 2014-08-27
    • status: accepted --> closed
     

Log in to post a comment.