This program will find the area of a circle without pi!

Pages: 1234
Math makes more sense: mathematics isn't a plural verb. No one says "mathematics are," because it should be "mathematics is."
mathematics isn't a plural verb.

Is it a single verb?
It's a noun.
It could plural or singular, I think. You can refer to the entire field of mathematics, or you can refer to the fields that make up mathematics. If that makes sense.
"The mathematics are complex."
"[the study of] Mathematics is often undervalued."
Last edited on
Is there a program that can skip pi entirely? not even 22/7 because it's indirect. Is there a way to just not even get close to 3.14159?
If I'm right in thinking that you're asking if it's possible to find the area of a circle without using pi at all, then the answer is "sort of". There are lots of methods of approximating it without using pi, but you can never get the exact answer without pi (and you can never get the exact value of pi, so you can never really know the exact area of a circle).
@chrisname:
A shorter way of saying what you just said:

Finding (an approximation of) the area of a circle is equivalent to computing (an approximation of) pi.
Is it a single verb?


I meant to say you use a singular verb when you're talking about it. My mistake.
I'm still surprised no one has mentioned this classic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#define _ F-->00||-F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}

http://www.ioccc.org/1988/westley.fix.c
Um, what language is that
Some bizarre flavor of C only used by really really old code.
Last edited on
bizarre flavor of C

http://ideone.com/CKG1Ap
1. it generates a runtime error
2. I don't see where F_OO is declared before it is used
Fixed it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#define _ F-->00||-F-OO--;
#include <cstdio>
void F_OO();
int F=00,OO=00;
int main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}
void F_OO()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}
It wasn't broken, you didn't need to convert it to C++ ;)
I tested it with my C compiler but it didn't work :(

so, I changed it.
Nvm, I accidentally clicked

Choose Language:

C++ *Click*
C

woops
Well, if you want to approximate pi, you could easily just use 768sqrt(2-sqrt(2+sqrt(2+sqrt(2+sqrt(2+sqrt(2+sqrt(2+sqrt(2+sqrt(2+sqrt(2+1))))))))))

Of course, that's probably even more complicated, but at least you can input that versus the decimal.
@Ispil
How is that anywhere near pi?
http://ideone.com/NWWbLn
Pages: 1234