Tuesday, September 15, 2009

Lyrics for 'Write in C' [Beatles - Let it be]

NEW LYRICS TO BEATLES SONGS - 'Write in C' (Let it be)

When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom,
"Write in C."

As the deadline fast approaches,
and bugs are all that I can see
Somewhere, someone whispers:
"Write in C."

Write in C, Write in C,
Write in C, oh, Write in C.
Logo's dead and buried,
Write in C.

I used to write a lot of FORTRAN.
For science it worked flawlessly.
Try using it for graphics!
Write in C.

If you've just spent nearly 30 hours,
Debugging some assembly.
Soon you will be glad to
Write in C.

Write in C, Write in C.
Write in C, oh, Write in C.
BASIC's not the answer.
Write in C.

Write in C, Write in C.
Write in C, oh, Write in C.
Pascal won't quite cut it.
Write in C.

---

Monday, September 14, 2009

0.999 (9 recurring) = 1?

From wikipedia (http://en.wikipedia.org/wiki/Proof_that_0.999..._equals_1):
{
In mathematics, the repeating decimal 0.999… denotes a real number equal to one. In other words, the notations 0.999… and 1 represent the same real number. This equality has long been accepted by professional mathematicians and taught in textbooks. Proofs have been formulated with varying degrees of mathematical rigour, taking into account preferred development of the real numbers, background assumptions, historical context, and target audience.
}

One of the proofs given is:
x = 0.999 (recurring)
=> 10x = 9.999
=> 10x - x = 9.999 - 0.999
=> 9x = 9
=> x = 1

But this wrong! Whats making it wrong is that you consider the no. of digits after the decimal point remains same; or in other words, that you consider (infinity - 1) = infinity.
When n is HUGE, (n - 1) is approximately= n.

The following is the correct method. First assume that x = 0.999...... (n 9s) with n = HUGE!
x = 0.9999999999999999999999999999999999999999 (40 9s total)
10x = 9.999999999999999999999999999999999999999 (Still 40 9s; 39 after decimal point)

10x = 9.9999999999999999999999999999999999999990
- x = 0.9999999999999999999999999999999999999999
-------------------------------------------------
9x = 8.9999999999999999999999999999999999999991
-------------------------------------------------


Now make n = infinity. So it makes
9x = 8.9999999999999999999999...(infinite 9s)............99991

Now when you divide by 9, you get

x = 0.999999999999999999999999999999999999999... (infinite 9s i.e. recurring again!)

----------- x -----------

Another proof goes as:

0.333 (recurring) = 1/3
=> 3 x 0.333 = 3 x 1/3
=> 0.999 = 1

But since the problem we are dealing with (i.e. Is 0.999... = 1?) is very critical like a man standing on a knife edge on a single toe, immeasureably small factors also matter!
So we cannot say 0.333 (recurring) is equal to 1/3.
1/3 is a perfect division of a cake into 3 parts.
0.333 (recurring) is NOT a perfect division into 3 parts!!

As a corollary of this discussion, you can say:
One who can divide perfectly may be called God.

---