process-amath: simplify and work around perl bug.

Perl mistakes 0.1530e-305 for zero.  Work around that.
Stat: improve various q-functions.