Python Forum
ln2 value is _math.c (cpython)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ln2 value is _math.c (cpython)
#1
Hi. I'm not so sure where to ask it, so I'm trying here.
m looking at the source code of _math.c (line 25):

#if !defined(HAVE_ACOSH) || !defined(HAVE_ASINH)
static const double ln2 = 6.93147180559945286227E-01;
static const double two_pow_p28 = 268435456.0; /* 2**28 */
and I noticed that ln2 value is different from the what wolframalpha value for ln2. (bald part is the difference)

ln2 = 0.693147180559945286227 (cpython)

ln2 = 0.6931471805599453094172321214581 (wolframalpha)

ln2 = 0.693147180559945309417232121458 (wikipedia)

so my question is why there is a difference? what am I missing?


I asked this question also in Stack-overflow if it's matter - stackoverflow question
Reply


Messages In This Thread
ln2 value is _math.c (cpython) - by matanya_stroh - Feb-06-2018, 02:44 PM
RE: ln2 value is _math.c (cpython) - by Larz60+ - Feb-06-2018, 07:44 PM
RE: ln2 value is _math.c (cpython) - by Larz60+ - Feb-06-2018, 08:01 PM
RE: ln2 value is _math.c (cpython) - by Gribouillis - Feb-06-2018, 08:14 PM
RE: ln2 value is _math.c (cpython) - by buran - Feb-06-2018, 08:19 PM
RE: ln2 value is _math.c (cpython) - by Gribouillis - Feb-06-2018, 08:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [CPython] Can't run script python VietVH 2 1,279 May-21-2022, 04:49 PM
Last Post: VietVH
  ImportError: /home/ali/Documents/test/charm/core/crypto/AES.cpython-39-x86_64-linux-g Anldra12 0 1,304 Apr-28-2022, 07:13 AM
Last Post: Anldra12
  Reducing runtime memory usage in Cpython interpreter david_the_graower 2 2,335 Oct-18-2021, 09:56 PM
Last Post: david_the_graower
  Navigating cpython source using python quazirfan 3 2,105 Aug-09-2021, 07:52 PM
Last Post: quazirfan
  IronPython from CPython amasis 3 2,350 Feb-05-2021, 12:26 PM
Last Post: jefsummers
  ImportError: /home/pybind11_example.cpython-37m-x86_64-linux-gnu.so: undefined symbol chaitra 2 5,265 Feb-03-2021, 05:14 AM
Last Post: chaitra
  compiled cpython output wrong version bigrockcrasher 0 1,554 Feb-25-2020, 06:31 PM
Last Post: bigrockcrasher
  CPython: Knowing when the interpreter expects more input b0bh00d 1 2,177 Apr-18-2019, 05:08 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020