Search:

Type: Posts; User: eehiram

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    6,335

    Sorry if you got the wrong impression. I meant...

    Sorry if you got the wrong impression. I meant that all you guys here seem like you're really hard core and everything is easy to you, and calculating pi with BPP seems like it would be a popular...
  2. Replies
    10
    Views
    6,335

    Yes, completely wrong--I don't even get the...

    Yes, completely wrong--I don't even get the initial 3. Yes, pi can be written out in hexadecimal digits. I expected everyone here to be familiar with BPP's formula for the nth digit of pi, as it is...
  3. Replies
    10
    Views
    6,335

    This code from the Internet works, but I did not...

    This code from the Internet works, but I did not write it:


    #include <stdio.h>
    int a[52514], b, c=52514, d, e, f=1e4, g, h;
    main(){
    for(;b=c-=14;h=printf("%04d",e+d/f))
    ...
  4. Replies
    10
    Views
    6,335

    pi spigot program

    I am attempting to use the Bailey-Borwein-Plouffe algorithm, ((4/(8n+1))-(2/(8n+4))-(1/(8n+5))-(1/(8n+6)))/16^n for the nth digit of pi.

    Here is my code:

    #include <stdio.h>
    int main(void){
    ...
  5. I think the 16 bit int vs. 32 bit int seems to...

    I think the 16 bit int vs. 32 bit int seems to explain the discrepancy. For now, I don't have the money to put up for a new c compiler, or even a 2002 c compiler for that matter. So, I throw in the...
  6. Here is one website with the above code:...

    Here is one website with the above code: http://www.matpack.de/Info/Mathematics/Pi.html
  7. Well, Salem, the code still does work. Here is my...

    Well, Salem, the code still does work. Here is my version, copied and pasted:


    int main(void){
    int a[3302],b=3301,*c=a,d,e,f=0;
    for(e=b; --e; *c++=1)
    ;
    *c=2;
    for(d=2001; d--;...
  8. Well, cwr, I'm not sure what the problem is...

    Well, cwr, I'm not sure what the problem is because I copied and pasted my code into this forum in my original post, so it's not the code itself. Maybe it's a glitch in my compiler.
  9. The only remaining error states that printf...

    The only remaining error states that printf "function declared implicit int". I tried adapting your (int) suggestion, but it doesn't seem to have the right effect on my compiler.
  10. The first line of output reads:...

    The first line of output reads: 166650389113343-1859-4810-044205378-071015423-14763-505304262005271204801135-150

    What's the O(n^2) formula?

    Thanks for the pointers, Jafet. The point of this...
  11. attempting to calculate e with spigot algorithm

    Hello, everyone. I am trying to use a c program I found on the Internet:


    int main(void){
    int a[3302],b=3301,*c=a,d,e,f;
    for(e=b; --e; *c++=1)
    ;
    *c=2;
    for(d=2001; d--;...
Results 1 to 11 of 11