Fix frequency evaluator: add min square search and return product HPS instead sum.
Add more frequency test cases.