Calulation in lim (1 + 1 /n) ^n when n -> infinite

Salvatore DI DIO artyprog at gmail.com
Mon Nov 9 07:21:14 EST 2015


Hello,

I was trying to show that this limit was 'e'
But when I try large numbers I get errors

def lim(p):
    return math.pow(1 + 1.0 / p , p)

>>> lim(500000000)
2.718281748862504
>>> lim(900000000)
2.7182820518605446  !!!!


What am i doing wrong ?

Regards



More information about the Python-list mailing list