Useless Scripts/Programs

hehe

crazy how this was supposed to be a thread for sharing useless programs, then it turned into one that discussed UPFs and the spike in autism diagnoses and now it turned into a programming support one
 
A test about pointers in C. You can try to guess what it does.

C:
#include <stdio.h>

int main(void)
{
	#define A_SIZE 25
	int i, a[A_SIZE]={-1}, *ip;
	for (i=0;i<A_SIZE;a[i]=i,i++);
	for (i=0,ip=(int*)a;i<A_SIZE;ip++,i++) printf("a[%d]=%d\n",i,*ip+4);
}
 
Don't let yourself be limited by the limits of Standard C. There are libraries for C, such as the GNU Multiple Precision Arithmetic Library under LGPL, so you can link it without viral effects and crunch along.
I believe that wriing my own code is the exact definition of not letting myself be limited by C99. hello?

bc and 'libraries' cannot be added to my own projects, id est, not my code. I am not into licensing that isn't bsd based. Even so, i can write my own code.

Since i am not a math guy, i had to spend the past three days analyzing numbers searching for patterns. voila! i see the patterns and now my algorithm is complete as version 1.

I've added artificial intelligence to my arithmetic code, such as age of trinity, zero distance, sets and set ids etc. (i have no idea what math people may call these patterns but i also do not care to research the matter. i name them myself. LOL)

i like my code better than your suggestions. I will keep my ai arithmetic, which could also be used with ocr and personal handwriting to 'show the work' if necessary. In my opinion, my code is better for my purposes.

I have included some screen captures of my version 1 test runs and i have successfully calculated 1googol plus 1googol. have a look...

also, thanks for offering advice where it wasn't requested, i still appreciate and respect you very much.

Have a nice day and happy coding (well, programming, since you are a pro). I'm just a hobbyist. bye for now :-)
 

Attachments

  • mymath1.jpg
    mymath1.jpg
    86.6 KB · Views: 19
  • mymath2.jpg
    mymath2.jpg
    158.5 KB · Views: 19
Back
Top