# Some imperfections about Rationalize, Chop and other functions related to N

I find, in version 11 on Windows 7,64 bit, in the following example that, Rationalize and Plot together give unnecessary warnings (ps: this example can be find in documentation center: ref/Rationalize)

Plot[Log[Abs[Pi - Rationalize[Pi, Exp[-n]]]], {n, 0, 20}]


Rationalize::tolnn: Tolerance specification E^-n must be a non-negative number.

Rationalize::tolnn: Tolerance specification 2.71828^(-1. n) must be a non-negative number.

Rationalize::tolnn: Tolerance specification 2.71828^(-1. n) must be a non-negative number.

General::stop: Further output of Rationalize::tolnn will be suppressed during this calculation.

For Chop and other functions related to N, similar things occur.

This behaviour is not surprising, in fact it is quite expected. Exp[-n] is not a number. It is a symbolic expression. It only becomes a number if we substitute a number for n. Read more here:
Why would this be in the documentation then? Plot is such a commonly used function (also by complete beginners) that they made it try to guess your intention and automatically decide whether the evaluate the input symbolically or not.
f[n_?NumericQ] := Log[Abs[Pi - Rationalize[Pi, Exp[-n]]]]