def exponential(self,value):
        """
        Compute exponential e and exp(value) for a given value 
        """
        
        self.value = value
        
        #attempt to yield an approximation of exp(n) for a given value
        try:
            for k in (1,100000000):
                exp = ((1+1.0/k)**k)**value
                yield exp
            
            if self.value == 1:
                print "e = %s " % repr(exp)
            else:
                print "exp(%s) = %s " % (value,repr(exp))
                
        #Raise TypeError if input is not numerical               
        except TypeError:
            print "Please enter a number "

        Compute exponential e and exp(value) for a given value 
        
recipes/Python/576897_RectangleMethod/recipe-576897.py