[Collection] the most interesting procedure

xiaoxiao2021-03-06  37

The following program is one of the most interesting programs I have ever seen. If you compile the run, it can calculate the first 800-bit value of the PI. I haven't seen people who know this program yet.

Long a = 10000, b, c = 2800, d, e, f [2801], g;

Main ()

{

For (; b-c;) f [b ] = a / 5;

For (; D = 0, g = c * 2; c- = 14, printf ("%. 4D", E D / A), E = D% a)

For (b = C; D = f [b] * a, f [b] = D% - g, d / = g -, - b; d * = b);

}

The result is this:

31415926535897932384626433832795028841971693993751 05820974944592307816406286208998628034825342117067 98214808651328230664709384460955058223172535940812 84811174502841027019385211055596446229489549303819 64428810975665933446128475648233786783165271201909 14564856692346034861045432664821339360726024914127 37245870066063155881748815209209628292540917153643 67892590360011330530548820466521384146951941511609 43305727036575959195309218611738193261179310511854 80744623799627495673518857527248912279381830119491 29833673362440656643086021394946395224737190702179 86094370277053921717629317675238467481846766940513 20005681271452635608277857713427577896091736371787 21468440901224953430146549585371050792279689258923 54201995611212902196086403441815981362977477130996 05187072113499999983729780499510597317328160963185

转载请注明原文地址:https://www.9cbs.com/read-62331.html

New Post(0)