$ perl -MPOSIX=HUGE_VAL -e 'print log(1 / HUGE_VAL)' Can't take log of 0 at -e line 1.