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

Pages: 1234
Mar 28, 2013 at 4:58pm
Math makes more sense: mathematics isn't a plural verb. No one says "mathematics are," because it should be "mathematics is."
Mar 28, 2013 at 5:01pm
mathematics isn't a plural verb.

Is it a single verb?
Mar 28, 2013 at 5:17pm
It's a noun.
Mar 28, 2013 at 5:31pm
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.
Mar 28, 2013 at 6:40pm
"The mathematics are complex."
"[the study of] Mathematics is often undervalued."
Last edited on Mar 28, 2013 at 6:41pm
Mar 30, 2013 at 1:53am
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?
Mar 30, 2013 at 2:08am
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).
Mar 30, 2013 at 5:15pm
@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.
Mar 31, 2013 at 6:18pm
Is it a single verb?


I meant to say you use a singular verb when you're talking about it. My mistake.
Apr 1, 2013 at 3:38pm
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
Apr 2, 2013 at 12:27am
Um, what language is that
Apr 2, 2013 at 1:07am
Some bizarre flavor of C only used by really really old code.
Last edited on Apr 2, 2013 at 1:07am
Apr 2, 2013 at 1:10am
bizarre flavor of C

http://ideone.com/CKG1Ap
Apr 2, 2013 at 2:19am
1. it generates a runtime error
2. I don't see where F_OO is declared before it is used
Apr 2, 2013 at 10:42pm
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()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}
Apr 2, 2013 at 10:46pm
It wasn't broken, you didn't need to convert it to C++ ;)
Apr 2, 2013 at 11:13pm
I tested it with my C compiler but it didn't work :(

so, I changed it.
Apr 4, 2013 at 3:38am
Nvm, I accidentally clicked

Choose Language:

C++ *Click*
C

woops
Apr 5, 2013 at 3:31am
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.
Apr 5, 2013 at 4:49am
@Ispil
How is that anywhere near pi?
http://ideone.com/NWWbLn
Pages: 1234