In reply to Mark Curry:
Thanks for clarifying this Mark.
I’m still looking at S.P.'s equation using modulo. Do you know what’s the correct way to use modulo to check the condition? I’m targeting an FPGA for my verilog and I’d like to know which code provides the optimum logic for resources/performance.