Mark44,
Ratch
It gives excellent results for all x <= 0, and gives reasonable results for x > 0, as long as x isn't too large.
You own example shows that it does not. For x=1, or x=2, or x=3, etc., your "Maclaurin series" strays way off course. No matter how many terms are used. If it was truly a Maclaurin series it would converge with exp(-1/x), even if x was not zero.If you discover that there is such a condition (that piecewise-defined functions cannot have Taylor series (and hence, Maclaurin series), I trust that you'll let me know.
Ratch