Can I have assertions in constant function

In reply to Subrahmanyam:

xcelium> run
xmsim: *E,ASRTST (./testbench.sv,16): (time 2 NS) Assertion test_pkg.logb2.__assert_1 has failed
test_pkg.logb2 logb2 function issue with computation logb2 of 0