I'm rather proud of my Sieve of Eratosthenes and my matrix class (which can multiply matrices, find the inverse and determinant of ANY size matrices, and more to come), but I'd hardly consider either brilliant..
I'm rather proud of my Sieve of Eratosthenes and my matrix class (which can multiply matrices, find the inverse and determinant of ANY size matrices, and more to come), but I'd hardly consider either brilliant..
Originally posted by Prelude
Most brilliant code? How about the worlds smallest program:
Unfortunately, it's not 100% portable.Code:
-Prelude
WHAHAHAHAHAHA - and now I've got the source code!! It's ALL MINE!!!!
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Simple,Originally posted by Aran Elus
first we must differentiate between clever code and brilliant code.Clever: skillful or adroit in using the hands or body
mentally quick and resourceful but often lacking in depth and soundnessBrilliant: distinguished by unusual mental keenness or alertness
very bright
All my brilliant code is written in languages that haven't even been invented yet.. showing just how brilliant it is. I'd post it but I'm pretty sure that'd lead to some sort of tear in space-time which would annihilate us all, that and they characters used to type it aren't available in this primitive textbox.
Hmm,
Perfect timing.. I'm at the end of a DBMS for C application.
It's 2104 lines. Wish within 2500 I can cover.
It has recovery from crash and dfregmentation. With hours I can ready for any DB. Its 100% portable. Though I'm using for Linux.
Needs little more review on recovery.
Once my brilliant code was
ohh.. another one, I was surprised after solving the Tower of Hanoi problem. Tough problem (in that time) but very short code.Code:void main() { int a = 10, b=5; printf("a=%d, b=%d\n", a, b); a +=b; b = a-b; a -=b; printf("a=%d, b=%d\n", a, b); }
Last edited by zahid; 11-26-2002 at 05:56 AM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
Code:Hmm, Perfect timing.. I'm at the end of a DBMS for C application. It's 2104 lines. Wish within 2500 I can cover. It has recovery from crash and dfregmentation. With hours I can ready for any DB. Its 100% portable. Though I'm using for Linux.
That is impressive.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }