public static function log($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $r = $z->abs();
        $theta = $z->arg();

        if ($r == 0) return new Complex(NAN, NAN);

        return new Complex(log($r), $theta);
    }