Guarded ln: exact logarithm when finite and positive, 0.0 otherwise.
ln
0.0
static double fastLn(double v) => (v.isFinite && v > 0) ? math.log(v) : 0.0;