>>> from maclaurin1 import serie1, serie2 >>> import math >>> def f1 (x): ... return 1/(1-x) >>> round(f1(0.2), 4) 1.25 >>> round(f1(-0.8), 4) 0.5556 >>> round(f1(-0.4), 4) 0.7143 >>> round(serie1(0.2, 0.01), 4) 1.24 >>> round(serie1(-0.8, 0.01), 4) 0.5607 >>> round(serie1(-0.8, 0.0001), 4) 0.5555 >>> round(serie1(-0.4, 0.0001), 4) 0.7143 >>> round(math.atan(0.2), 4) 0.1974 >>> round(math.atan(-0.8), 4) -0.6747 >>> round(math.atan(-0.4), 4) -0.3805 >>> round(serie2(0.2, 0.01), 4) 0.2 >>> round(serie2(0.2, 0.0001), 4) 0.1973 >>> round(serie2(-0.8, 0.0001), 4) -0.6748 >>> round(serie2(-0.4, 0.0001), 4) -0.3805