pi

This is a discussion on pi within the C Programming forums, part of the General Programming Boards category; how would i go about calculating pi to 1 million decimal places??? I know it's stupid but I desperate! please ...

  1. #1
    Unregistered
    Guest

    pi

    how would i go about calculating pi to 1 million decimal places???

    I know it's stupid but I desperate!

    please somebody help me I've got to get this off my shoulders

    Dave Smith

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Why do you need that kind of precision? Are you doing calculations for a particle accelerator or something? To calculate any number to one million decimal places in C you have to use a custom data structure. Calculate the number in small bits and then add those bits to a node in a linked list, to print the number traverse the list.

    Or use a language without number size constraints, like LISP.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pi - Hm, somethign is not right here.
    By MadnessRed in forum C++ Programming
    Replies: 8
    Last Post: 09-12-2008, 01:07 PM
  2. PI Equation in C
    By wallysworld in forum C Programming
    Replies: 13
    Last Post: 10-23-2006, 08:12 PM
  3. Pi Calculation
    By EvilGuru in forum C Programming
    Replies: 2
    Last Post: 05-02-2005, 04:25 AM
  4. Pi and the standard library
    By FOOTOO in forum C Programming
    Replies: 7
    Last Post: 04-15-2005, 11:23 AM
  5. C for PI
    By Lynux-Penguin in forum C Programming
    Replies: 13
    Last Post: 04-28-2002, 07:37 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21