Add somewhere after the fog equation is written:
Note that for this equation, a distance of zero is undefined. In
practice, povray will treat this value as "fog is off". To use an
extremely thick fog, use a small nonzero number such as 1e-6 or 1e-10.