Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98513

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

X-Received by 10.107.159.72 with SMTP id i69mr25569920ioe.23.1447071675290; Mon, 09 Nov 2015 04:21:15 -0800 (PST)
X-Received by 10.50.33.73 with SMTP id p9mr488968igi.4.1447071675235; Mon, 09 Nov 2015 04:21:15 -0800 (PST)
Path csiph.com!xmission!news.glorb.com!i2no1724507igv.0!news-out.google.com!l1ni1006igd.0!nntp.google.com!i2no1724497igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 9 Nov 2015 04:21:14 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=185.24.186.5; posting-account=sIqJqgoAAAD8X51Me6uRBgkN3MmBpfYe
NNTP-Posting-Host 185.24.186.5
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <ea008366-9aa2-47e6-b4b7-69e5d447d408@googlegroups.com> (permalink)
Subject Calulation in lim (1 + 1 /n) ^n when n -> infinite
From Salvatore DI DIO <artyprog@gmail.com>
Injection-Date Mon, 09 Nov 2015 12:21:15 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:98513

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Calulation in  lim  (1  + 1 /n) ^n  when  n -> infinite Salvatore DI DIO <artyprog@gmail.com> - 2015-11-09 04:21 -0800
  Re: Calulation in lim (1 + 1 /n) ^n when n -> infinite Chris Angelico <rosuav@gmail.com> - 2015-11-09 23:45 +1100
    Re: Calulation in lim (1 + 1 /n) ^n when n -> infinite Salvatore DI DIO <artyprog@gmail.com> - 2015-11-09 07:13 -0800
  Re: Calulation in lim (1 + 1 /n) ^n when n -> infinite Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-11-09 12:50 +0000
    Re: Calulation in lim (1 + 1 /n) ^n when n -> infinite Salvatore DI DIO <artyprog@gmail.com> - 2015-11-09 07:13 -0800
    Re: Calulation in lim (1 + 1 /n) ^n when n -> infinite Salvatore DI DIO <artyprog@gmail.com> - 2015-11-09 07:15 -0800
  Re: Calulation in  lim  (1  + 1 /n) ^n  when  n -> infinite Peter Pearson <pkpearson@nowhere.invalid> - 2015-11-09 17:51 +0000
    Re: Calulation in  lim  (1  + 1 /n) ^n  when  n -> infinite Salvatore DI DIO <artyprog@gmail.com> - 2015-11-10 00:26 -0800

csiph-web