+ Reply to Thread
Results 1 to 3 of 3

Calculation of PI() and 3.14159265358979 in excel

  1. #1
    Registered User
    Join Date
    08-16-2017
    Location
    chennai TamilNadu
    MS-Off Ver
    2015
    Posts
    1

    Calculation of PI() and 3.14159265358979 in excel

    In Excel while Calculating `=SIN(PI())` formula it returns `1.22515E-16`.If the `PI()` `Value(3.14159265358979)` is directly given like =SIN(3.14159265358979), it returns `3.23114E-15`.

    Please anyone can share your opinion about how the excel calculates differently, when 'PI' and 3.14159265358979 are passed as parameter.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Calculation of PI() and 3.14159265358979 in excel

    I doubt the calculation is different. I expect that the explanation is in the common and unavoidable properties of floating point arithmetic. I would guess that, deep in the floating point representations, there is a slight difference between the value of the PI() function and the constant 3.14159265358979 (perhaps not visible in the cell display, but only visible when the numbers are stored as/converted to binary). Then there could be how floating point error effects the SIN() function. I am not intimately familiar with the internal workings of computer arithmetic, but I think we have at least one user here who may be able to shed much more light on the details, if that is of interest.

    Until then, you might review some of the links I posted here that discuss floating point errors: https://www.excelforum.com/groups/ma...nd-errors.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Calculation of PI() and 3.14159265358979 in excel

    Quote Originally Posted by Elakkiya630 View Post
    In Excel while Calculating `=SIN(PI())` formula it returns `1.22515E-16`.If the `PI()` `Value(3.14159265358979)` is directly given like =SIN(3.14159265358979), it returns `3.23114E-15`. Please anyone can share your opinion about how the excel calculates differently, when 'PI' and 3.14159265358979 are passed as parameter.
    PI() does not return "exactly" 3.14159265358979. It only appears that way because Excel formats only up to the first 15 significant decimal digits, an arbitrary limitation.

    In fact, the difference can be calculated, to wit: =SUM(PI(),-3.14159265358979) formatted as Scientific is about 3.11E-15. More precisely:

    Please Login or Register  to view this content.
    I use period for the decimal point and comma to demarcate the first 15 significant decimal digits.
    Last edited by joeu2004; 08-16-2017 at 02:00 PM. Reason: minor

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2007 : Excel function for weighted average calculation
    By jay8jay2001 in forum Excel General
    Replies: 14
    Last Post: 09-17-2014, 06:08 PM
  2. Replies: 0
    Last Post: 05-17-2014, 10:18 PM
  3. manual calculation for one worksheet by F9 and auto calculation for other sheet
    By rayshimadri in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2013, 06:16 AM
  4. Replies: 4
    Last Post: 07-23-2013, 07:51 AM
  5. Replies: 1
    Last Post: 01-15-2013, 08:51 AM
  6. [SOLVED] Conditional statement calculation based on result of previous calculation.(Need some help)
    By takeprofit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2012, 01:45 AM
  7. [SOLVED] [SOLVED] Calculation Excel 2000 - Excel 2003
    By Hege M in forum Excel General
    Replies: 0
    Last Post: 05-11-2006, 07:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1