How to find realtime variable is odd or even in system verilog?

In reply to sunanda_kommi:

This is not a SystemVerilog question. Even and odd are only defined for integers (there is no widely accepted definition for real values).