#On the name of ALLAH and may the blessing and peace of Allah #be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam. #Author : Fouad Teniou #Date : 06/07/10 #version :2.6 """ maclaurin_binomial is a function to compute(1+x)^m using maclaurin binomial series and the interval of convergence is -1 < x < 1 (1+x)^m = 1 + mx + m(m-1)x^2/2! + m(m-1)(m-2)x^3/3!........... note: if m is a nonegative integer the binomial is a polynomial of degree m and it is valid on -inf < x < +inf,thus, the error function will not be valid. """ from math import * def error(number): """ Raises interval of convergence error.""" if number >= 1 or number <= -1 : raise TypeError,\ "\n= 1 or number <= -1 : # raise TypeError("\n