|
|
1600 to the power of 1600 (and later 16000^16000)
on another forum, they were arguing about something, and it came up that the answer would be 16000^16000 so i worked on a simple, quite small program (using a premade class i made earlier) to calculate it?
however, i havnt done the main one yet, and for the moment have done 1600^1600 which took about 2.5 seconds
since its a console program, you cant copy and paste so i made it output it to a file
The Beginning Of All Things To End. The End Of All Things To Come.
- Ricky
- Moderator

Re: 1600 to the power of 1600 (and later 16000^16000)
You can copy and paste from a console though. Or at least windows console. Just right click, hit select, then use the mouse to select the text, then press enter.
As for the program, could you post the code here?
"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."
Re: 1600 to the power of 1600 (and later 16000^16000)
Ricky wrote:You can copy and paste from a console though. Or at least windows console. Just right click, hit select, then use the mouse to select the text, then press enter.
As for the program, could you post the code here?
sure, atleast the main cpp file, i wont bother with the Array class (plus i want to keep it private :p) but 'unshift' concatenates a new node to the start of the linked list (Array is a doubly linked list class)
basicly, it just does multiplication via a little algorithm
for each digit of the number to be multiplied (starting with the last), that digit is multiplied by the last parameter of the function, and then onto the new number, the last digit of that number is added. then that is removed from the multiplication, and then the whole thing divided by 10, and reused later added onto the next multiplication, aslong as the number is not 0, or there is a remaining digit in the original number, its continue
so like for example
1276 * 123:
6*123 = 738, %10 = 8 (8), 738-8 = 730, /10 = 73 7*123 = 861, +73 = 934, %10 = 4 (48), -4 = 930, /10=93 2*123 = 246, +93 = 339, %10 = 9 (948), -9 = 330, /10=33 1*123 = 123, +33 = 156, %10 = 6 (6948), -6 = 150, /10=15 0*123(no digits left) = 0, +15=15,%10=5(56948)-5=10,/10=1 0*123 = 0, + 1 = 1, %10 = 1, (156948), -1 = 0 (END)
so 1276*123 = 156948, which checking with a calculator is correct
Last edited by luca-deltodesco (2006-06-15 08:06:07)
The Beginning Of All Things To End. The End Of All Things To Come.
- MathsIsFun
- Administrator

Re: 1600 to the power of 1600 (and later 16000^16000)
Ahem: Full Precision Calculator
But my biggest problem with the calculator is how *slow* it is. Flash is very slow at math, orders of magnitude slower than C.
I had a C program that returned an answer "immediately" (I didn't time it, but it was certainly less than a second), and the same algorithm took about 50 seconds in Flash.
But Flash is very good at graphics.
Now if I could get Flash to have some Java embedded ...
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Re: 1600 to the power of 1600 (and later 16000^16000)
for very big numbers, i also made one to multiply two arrays of digits (THIS IS ACTIONSCRIPT)
note that for each digit of the second number, it multiplies by first, and adds it to the previous, two algorithms inside of one (one for multiplying, one for adding (with a cheated multiplation by 10^j)
so for example again, 1276*123:
123 (3): FIRST TIME ONLY
1276(6)*3 = 18, %10 = 8 (8), -8 = 10,/10 = 1 1276(7)*3 = 21,+1=22 %10 = 2 (28), -8 = 20, /10 = 2 1276(2)*3 = 6, +2 = 8, %10 = 8 (828), -8 = 0 1276(1)*3 = 3, %10 = 3 (3828), -3 = 0 (END)
123 (2): NOW DIFFERENT (j!=0)
1276(6)*2 = 12, 2 (2) 1 1276(7)*2 = 14,15 5 (52) 1 1276(2)*2 = 4,5 (552) 0 1276(1)*2 = 2, (2552) 0 (END)
2552(0) + 3828(8) = 8, (8) 0 2552(2) + 3828(2) = 4, (48) 0 2552(5) + 3828(8) = 13 (348) 1 2552(5) + 3828(3) = 8,9 (9348) 0 2552(2) + 3828(0) = 2, (29348) 0 (END)
123 (1):
1276(6)*1 = 6 (6) 0 1276(7)*1 = 7 (76) 0 1276(2)*1 = 2 (276) 0 1276(1)*1 = 1 (1276) 0 (END)
1276(0) + 29348(8) = 8 (8) 0 1276(0) + 29348(4) = 4 (48) 0 1276(6) + 29348(3) = 9 (948) 0 1276(7) + 29348(9) = 16 (6948) 1 1276(2) + 29348(2) = 4,5 (56948) 0 1276(1) + 29348(0) = 1 (156948) 0 (END)
which like before, is correct 156948
so in flash, using that function if you had
var a:Array = new Array(1,2,7,6); var b:Array = new Array(1,2,3); trace(mul2(a,b));
you would get "1,5,6,9,4,8"
Last edited by luca-deltodesco (2006-06-15 08:12:10)
The Beginning Of All Things To End. The End Of All Things To Come.
Re: 1600 to the power of 1600 (and later 16000^16000)
MathsIsFun wrote:But Flash is very good at graphics.
yes, thats what i love about it, its so easy to just make something visually appealing quick
one thing yours does have mainly, is negatives and decimals mine only deals with positive integers but i guess having mine do that, does give a speed improvement, which is neccesary i think when doing stuff like 1600^1600 
Last edited by luca-deltodesco (2006-06-15 08:10:38)
The Beginning Of All Things To End. The End Of All Things To Come.
Re: 1600 to the power of 1600 (and later 16000^16000)
LOL i just realised, i forgot link to the answer of 1600^1600 :X
but here is 2768^2768
823617 284356 234745 347593 291241 873913 033287 700873 766751 909815 689807 071956 117829 156675 038202 535351 155555 407872 134347 257703 360575 427480 181311 716367 821466 022969 920595 977816 458665 047554 330461 259078 723229 163396 643248 191186 230670 688915 389314 784048 880808 493000 008076 415649 135476 873251 440297 354131 704103 099782 133203 294904 870218 240878 241425 724364 247253 132222 274886 614754 767862 380105 920488 368806 246734 746581 779090 533052 359526 102458 214814 011906 512932 728159 259702 339379 178053 767064 888332 499251 009743 193517 951103 010156 630660 886697 587657 569540 538082 922029 063074 974000 382849 736771 235481 511550 060306 751709 731994 925006 938663 189880 930905 601545 362926 310022 903436 273899 290782 992131 580896 277618 142512 498237 662690 208646 464798 161057 237861 668874 606576 731318 701692 760964 457451 859298 719538 499766 211838 368951 342078 003640 273167 478077 721766 788027 607650 515969 746144 677804 168816 665175 664001 863295 835008 651058 827466 316889 792541 195664 317856 678758 611052 911718 702387 384052 691123 673668 245856 306994 120313 249234 732857 657526 779365 201318 015568 046496 105559 495213 240419 300612 360616 762080 235560 045582 658549 678273 715498 519932 040836 897294 495493 070499 622946 844210 574876 457797 264212 320788 030826 230446 037580 332330 890595 319558 470122 501383 574092 063094 635209 874973 539275 822932 772853 969446 649097 574711 137694 105622 851281 045146 000219 687746 746809 309998 609043 121777 876395 862713 717743 125455 238592 453177 295392 700757 971227 499591 951004 209306 627291 907301 263614 514451 308394 765861 063961 526221 278328 086663 799272 065511 263827 456038 941349 403223 851448 087180 171926 363589 930939 867078 410235 822557 625449 862226 098085 380210 006522 997411 575409 681237 415272 594085 276453 529449 355396 600878 038771 601833 413528 735331 177156 925821 701443 479799 450989 619345 517897 699203 787197 376410 030970 258718 513859 565446 726162 675366 411439 314763 310382 490566 345330 223770 920250 669105 041853 358327 568173 510990 300756 502857 682100 082087 201703 398477 831155 007482 934622 347238 284309 588864 980611 421417 638752 636485 836502 590527 031294 833803 331964 485552 132809 771010 269890 723595 792481 451938 595546 076461 515171 912600 972819 062051 665915 461323 677857 182986 523958 154277 723615 007186 516213 887523 461620 472195 027757 882707 383629 266550 606021 458707 486990 288203 790652 438523 565468 840790 841173 554185 296298 310620 922959 635906 013086 272616 794538 586610 999529 892497 523439 170477 993026 960476 390794 951917 065961 145286 591755 335883 400830 332538 447652 852586 832049 753479 209084 893172 250923 564622 137251 895536 915258 896692 838773 063026 864517 964829 963424 806449 611089 015871 984887 588605 158350 912342 747580 735566 462109 352746 156678 728136 630534 772000 953726 714359 214012 126905 260685 786871 022440 579492 955980 843823 481430 622633 212053 506456 379332 512562 508154 015511 420283 064951 269792 884322 883564 355891 435092 908198 200179 721758 317090 447579 191545 763521 778901 684159 560537 315475 666661 136685 046731 613567 046651 298342 460224 652453 426807 358885 724931 056934 035885 513111 609841 465086 856508 110357 844656 285182 557193 519657 784587 092857 674668 949342 597749 887300 904697 054873 312834 235788 264965 644070 045773 119192 746980 394902 541704 423161 608825 733994 390501 359124 832901 227988 105275 652779 907058 621767 385787 627130 126378 471337 320283 402101 249648 399142 452172 975735 601868 036190 801398 186031 360390 728516 424375 292010 976454 757301 863683 991734 045909 743144 366815 564046 687131 107642 081369 069440 795347 262642 130817 407143 153281 100187 237183 257206 179708 687338 710915 403794 598634 242415 268865 909871 219877 061792 226117 950354 540055 197118 384141 071685 270392 423126 746602 372955 424081 544139 670006 214896 713058 491512 215365 294418 856150 629691 042953 661410 151511 937664 051062 523518 748367 812673 960571 702196 825338 179568 249473 317085 651757 147127 664385 375918 604163 356358 400144 741577 671205 860170 574638 773181 340056 433996 456321 130850 672244 761305 601895 112358 165781 577305 498377 777143 258007 248566 247981 696672 508853 242464 317784 676444 443703 277086 493028 546664 993397 768363 457586 488966 760826 238863 558068 918576 607094 600552 714231 304126 086817 896082 851045 260754 565316 266760 280408 936274 348847 668898 557202 410663 668026 476069 572662 408068 483598 990787 541656 189951 154724 167646 778470 458033 103615 212863 796100 224488 537922 925595 949542 753088 939499 858956 960823 713208 600735 732907 462366 579086 264344 844960 163610 508717 872511 138107 040189 436296 122905 593812 240972 994663 812665 402847 175391 125720 062431 412480 540724 712362 242040 502059 168296 008949 500309 182495 866362 682165 125767 220879 280119 342883 759823 203498 334441 631849 717448 346363 244408 512338 065859 387133 218568 934448 324380 284304 918042 692824 615605 997658 885170 394055 619794 387967 107278 205110 354226 193960 837078 881116 943240 011698 886521 845042 653269 153216 984375 004352 186537 228604 987060 520714 813083 021622 968867 751128 375166 328889 395520 779789 498771 509363 271398 768798 164970 630125 232738 045040 791699 313792 558653 799875 121154 526515 303888 066625 279597 601700 195738 095374 414581 304913 081813 251007 204960 839626 867015 535806 842152 835523 818103 192089 657039 476173 892437 442142 866403 492498 773917 447339 221853 360711 119792 422679 755449 988664 193665 852649 304890 676598 490981 060114 830111 135699 651562 680470 471040 490103 428647 660384 317693 440021 229282 149138 808576 109598 148622 828801 904769 285965 866014 067325 940668 530993 791927 064021 258928 565742 624083 533508 956141 778069 712368 605422 443867 667266 267143 457194 390695 300704 585729 645481 168990 710814 206304 669550 058544 566250 026142 332163 389060 192919 264586 856923 210461 350100 688453 002941 418005 431271 741288 396710 232263 281895 817194 799779 374114 484256 374493 069522 483470 099204 249174 571827 943771 932419 487004 008685 245854 028683 210828 671602 543357 474006 840021 434239 234541 506139 262734 869761 171035 312566 666368 276943 615433 952969 522639 189451 831621 689577 645436 743978 531900 703600 839563 831720 152453 263879 965471 254815 198272 900885 754644 113385 966506 932367 628235 938973 676616 156756 582165 902563 230572 243224 259193 684495 360083 017894 181411 360478 582812 368808 871654 406041 679540 761215 889463 069192 732062 551567 889965 297890 394728 893072 634448 936004 886922 516201 553935 519886 906063 057375 923794 407707 938274 464606 422699 313202 010553 866107 347764 715123 821554 351531 937281 109264 068479 567579 999982 582993 948521 990297 057271 512954 125912 127281 246954 088001 022371 978371 370998 745123 105641 759772 553619 015656 890741 452838 663246 210876 784016 740071 951806 223007 694678 655942 654755 035655 799727 475531 942767 496622 410436 695714 341368 140229 727907 505749 580150 928396 495774 230148 711558 390625 507071 813912 359856 237821 316447 659285 313026 695608 577543 559828 643052 972976 531149 605973 450061 375842 587784 224232 747532 802352 023019 176058 087302 866791 798487 260075 827057 838394 685116 406749 237893 470312 855666 462493 494453 920433 576616 536305 682466 727860 152776 148014 800687 267648 040056 994389 559268 180740 640727 055364 267067 931682 152130 100693 952077 802416 581570 942052 373181 321829 389874 384290 638923 966880 489894 757415 563896 549244 862976 032015 073341 125525 578452 963210 969702 908702 060199 322217 756484 982590 479222 057447 440874 003444 449030 221588 260223 446912 592551 639353 274893 188267 471955 419965 111944 638000 568284 928635 654372 098036 014946 826245 607689 146188 221790 530779 046808 861338 364060 855436 307701 586708 934900 961787 813612 349775 269252 423950 187991 844077 091937 570306 043355 991011 620304 297484 792739 398259 727735 611601 787692 460597 562529 108014 917892 115231 926552 556208 718722 484625 249726 954484 558051 362676 841935 490883 922993 927620 347864 861643 278580 324786 968624 061500 124234 445015 230278 273632 826454 356792 569070 259419 887406 770780 314052 133991 303349 667268 890928 277265 903304 048257 808768 701959 518423 698255 766944 850777 809678 353393 831727 411368 417632 861163 244862 724963 947161 121598 244555 337008 631024 121842 560938 334223 645089 983575 084430 024596 233224 494022 937834 023176 027091 423148 076992 827389 460843 590666 154814 694113 618795 148700 726932 747011 371646 929646 910003 346659 180603 513294 118164 805444 108676 573805 581440 077013 684177 688234 858697 363554 996057 907656 798048 839500 444041 935640 708821 550117 122818 469801 641630 006383 839907 882725 054942 172537 142405 782466 264668 426737 530264 664396 193345 861727 542959 429768 817437 287221 065983 429049 306931 739915 979841 189149 400141 590741 656077 630353 131212 444369 381149 622315 037760 035418 692219 427192 112786 878963 434149 739682 827356 983734 496640 120184 325827 344494 002352 008813 646931 715449 270725 812782 446448 827923 986811 085933 078429 511798 948847 338902 700303 082907 234996 153064 035917 657097 375016 721733 424104 349786 358610 270746 460146 397069 096919 815750 614662 859865 527619 030049 307297 212702 603359 074382 458815 908475 295576 871172 116305 817211 451370 018528 653867 958645 717403 916793 631448 734672 911659 167434 219027 952209 543303 351819 149821 405209 547245 123832 054452 151031 197306 260920 356322 485495 360731 867350 172896 374236 285926 988933 537206 305769 683500 129656 914983 387233 862746 492993 957977 501599 113569 895728 947045 480202 914916 025517 726536 120435 212407 553561 283237 983888 489859 963117 545623 145634 446744 638433 330320 111379 361381 804523 348256 899510 727905 299074 671758 275062 018308 539373 348742 907020 547067 124355 022837 707329 989481 507319 214905 497976 205900 090938 798739 975096 161261 114724 788489 484669 291260 190366 534302 816642 039324 109052 766806 715394 334706 816625 483415 052622 732437 734814 050373 408248 804257 904714 604455 782129 924200 511734 261423 746124 151711 135942 010477 508895 107516 561890 196937 582781 716925 847916 313943 593327 066219 186503 091643 130747 463014 303047 307071 100753 070541 941552 060915 515033 345529 417872 561773 205303 857139 409707 386766 188538 287204 183365 134637 914677 410641 962692 181858 344499 859469 766610 152590 041976 489892 735473 912139 372922 200228 048297 993755 856664 487286 275715 789808 722257 417156 577737 440102 921700 161664 472490 698739 714109 219885 533083 369764 044794 016537 267498 329520 634568 770700 853140 357869 633310 190541 302534 059993 814801 461444 429853 982710 737391 562436 122394 684107 519739 663964 130857 085012 035595 866607 769487 378405 587702 313599 407307 618164 917427 309759 034482 973834 927608 237988 441837 203892 473141 285420 972836 354626 338492 382738 348054 295178 503130 365938 073225 906683 324728 600386 794647 589002 696710 719173 613755 757274 581584 151154 165091 579331 608576
(9528 digits!) using ~0.26Gb of RAM, took about 8 seconds for me
according to windows calculator, the answer is ~8.2361728435623474534759329124187e+9527
which if you look, the digits are the same :X, even the number of digits (9527 + the 8)
Last edited by luca-deltodesco (2006-06-15 08:19:00)
The Beginning Of All Things To End. The End Of All Things To Come.
Re: 1600 to the power of 1600 (and later 16000^16000)
here is 7213^7213 (i tried 7500 but it crashed at 98% from too much RAM)
389241 275433 240539 824354 592830 121498 640613 452068 658773 613752 484725 214345 783514 511170 153388 026011 348536 572793 700411 435467 886862 951538 435176 311071 524517 101461 848419 135512 873174 072821 025272 037808 077361 265559 118093 994484 182586 791913 876212 883112 641946 862800 953870 113119 475571 833268 943174 330820 349009 768462 196550 574364 103567 676846 261393 883685 690801 772290 209092 332464 517585 963279 272881 583368 219485 696661 627008 870308 178810 805052 057802 127972 651222 048285 471339 490959 042423 308456 240215 732701 195814 962747 926797 989242 219356 085899 662241 540242 755275 076953 901904 353680 959054 335505 022057 962571 607339 075363 391254 263453 211467 495763 563589 897045 114290 214706 014118 375013 856780 828659 528205 486222 974526 551211 036680 419311 287368 824961 803993 736801 688620 759048 390932 465071 094678 782863 471316 181728 528375 950141 772410 936326 028165 002764 875164 657872 905777 537520 631535 234762 432484 344749 181450 974898 453399 510053 113171 883607 596501 309138 586051 941163 497888 197535 908144 312993 283166 036235 435740 094054 892055 967724 712160 958380 738078 035049 992733 805681 107198 173323 136625 267039 632422 504713 681757 165492 731985 208568 111440 582983 329561 388711 260491 313965 782903 536304 170990 786317 775093 975984 645358 658883 136778 285367 604309 307465 413875 298296 185632 306664 549107 229472 012968 640272 211716 211438 469828 902298 425502 160291 443390 421323 231034 044107 746980 953980 542878 158490 220073 030046 405596 510515 784768 528811 213221 777228 386845 168482 050129 869086 531756 747768 246807 254259 218586 872950 377049 645180 780234 227466 455984 226576 922920 275150 878694 159652 879204 404350 923071 720552 447652 455575 428821 784734 813321 043688 513765 673896 372008 203851 044600 456946 035632 928140 669243 272721 355110 543728 845660 303378 325807 840807 579566 398521 718881 848452 968920 679223 802099 929004 330411 675749 508642 700942 715810 545824 660708 814664 111453 636284 317994 712677 613768 947717 927665 825718 108562 834045 803257 619534 529844 547958 696926 615172 231865 303618 350586 499574 038443 852255 801118 465925 134518 517681 673988 558876 724591 979396 183247 490790 790243 325777 061114 772154 121683 919823 197252 634232 382037 994794 030483 317582 982888 411444 170634 369354 950016 441410 212578 615238 957353 737373 702097 147531 280917 304795 276554 070355 480187 465156 992085 613053 750629 639267 497463 769856 922635 435973 109978 241969 836262 913740 574168 800681 577598 197017 167668 743592 407284 693621 410652 528669 508730 090339 523013 423764 674329 418830 692234 151879 794027 538084 558724 088515 165008 437700 898792 126804 729356 920906 447346 338348 123899 768161 825510 951065 652362 278490 506123 126018 269565 572123 125298 252661 491324 216273 511480 721926 245104 066173 866659 600755 838116 506143 909008 239513 992059 455983 783417 934318 889986 253967 398078 696262 641113 237008 738879 185115 432149 215372 516038 877183 576635 238385 150951 080211 897654 561747 709020 809039 812418 656983 946378 015772 690121 422285 747546 238514 817501 198874 962766 739695 358146 800248 971411 008232 304907 166774 521914 035291 824805 741665 755153 031945 577454 929246 278188 530555 776607 719556 101334 939859 743449 153596 596698 122952 376470 145495 061986 972675 118405 503772 593110 555156 847811 263306 916140 759381 625633 652154 166072 327926 518262 281181 090694 912613 650925 915384 235537 590909 515193 322074 933330 948332 207429 244455 697602 192876 473765 192554 180815 525710 189072 951700 779333 733708 786205 503866 741631 156416 001154 808264 573380 314273 391662 357898 318857 063040 657327 951393 219651 408283 350304 085852 256770 340681 496200 366071 227684 696711 722292 257569 205715 517244 106405 367155 138995 928214 565920 420146 850822 142649 556646 832838 431328 046668 566910 395233 324075 688785 805452 366120 912642 050815 704063 080273 777682 733750 948675 797881 939592 690468 367234 647350 438486 942981 658053 101665 270812 187090 669071 630633 560098 807690 958154 862621 424719 654318 419465 685739 196404 159605 412546 632901 540626 914110 368215 900544 939035 014019 019167 734484 371171 383267 679048 335075 330939 078772 495502 626802 155687 562668 806234 897202 341578 812372 741808 287095 102398 933247 150424 582208 262089 992380 672842 371969 177916 682089 581077 965540 207655 469835 975988 142827 302891 183343 878207 110883 897632 661455 373125 107003 138447 799151 552488 853332 133073 415163 011172 081047 889886 142435 277403 047978 633721 288452 480701 695565 586997 685819 476702 284603 220525 738288 095208 496915 509332 915996 830524 152241 637150 523892 969195 714143 903818 883678 780602 035884 014857 041824 216877 696087 102267 339488 404837 399994 068945 897857 672274 717249 376582 604442 983599 662692 606762 405440 366149 049709 342686 930208 257564 908611 251556 947914 348141 797585 072743 764869 342841 793710 298628 635329 947532 394016 783815 431235 717584 639812 949864 783405 488389 252293 831562 017360 089650 044965 577108 642456 110329 816074 296854 791267 801400 099492 816824 683372 478956 168686 502170 561731 557411 913479 442613 358310 886855 165691 324781 568244 665472 253390 212378 377677 072650 511401 807788 301739 424444 972344 456786 640526 025023 874739 094217 776313 574395 344939 233169 154330 119898 234160 325620 929695 315996 180510 380857 152541 381743 906811 351867 122955 272987 785934 525035 068435 294395 725847 606908 793008 057583 556274 628867 523728 048749 255334 465036 232657 066586 526081 979928 795327 997433 980365 207488 727939 254288 890910 011103 131954 543905 850341 236858 039766 887066 653994 213761 852713 264759 576681 722016 263943 497501 874491 501349 668792 799965 370582 814916 040889 657610 016475 047800 852321 083676 454751 435712 299055 896398 803585 488493 125950 937591 144869 988441 350272 788297 960821 576111 979565 413476 045417 247254 756012 145001 466165 400381 664166 422525 461232 545533 611180 903954 014655 688371 451527 279509 392353 351851 842797 713004 118472 311408 314120 870616 994665 968369 620871 821874 785223 951734 875188 494681 397663 069346 941415 651675 993576 831060 187507 708867 464833 210989 504193 886095 829160 255446 462691 696081 161707 570431 006302 960252 916310 680888 616374 906808 636856 086334 743303 019864 444403 295449 974305 227612 825988 171427 372855 269782 140245 119940 424844 161688 273168 001956 171536 284990 202148 532725 276275 440838 202768 643675 129764 402940 203566 591407 445323 906839 152000 617823 329384 722894 381475 908900 167932 621432 354075 695472 451380 916560 261131 877151 216376 758205 716223 042882 065825 415409 220841 704696 980467 260498 016060 270213 456879 418006 465714 201864 846162 709821 869060 146071 169643 568043 733299 037487 932740 652380 693378 664116 594381 986425 204220 969034 932669 831561 011677 189506 803193 002304 946228 298257 418456 949688 172566 513163 745784 694263 833882 603521 342447 815067 386738 478255 228463 476670 069485 419616 163260 750350 242900 254517 191354 286472 222243 821635 100046 977364 867550 911626 165929 553348 092765 912982 885915 466039 445670 979478 877111 374711 209711 021008 043420 531152 730889 091842 514995 530075 134805 259076 741734 253562 833867 771713 832566 584312 115276 852767 159464 688518 722635 934251 451001 200516 066331 511435 220824 249299 472896 521864 650701 422428 603098 056480 904783 225693 647818 885377 615477 152804 679965 546433 537217 403235 099282 949426 142501 351085 405921 151995 115162 109904 181408 245031 006240 056593 141816 502359 425364 706721 068884 446042 542695 723140 201677 498513 680257 528279 168279 092896 626098 845970 767594 969094 862932 794540 605197 874750 398038 178264 964786 133854 658244 370651 346553 496758 911829 294473 099612 283807 406572 193303 079889 267325 065905 437967 475664 288210 229865 967503 979333 429824 255064 419763 948494 812219 870281 634233 887096 499785 848627 506020 239354 081522 126724 485550 336608 679679 653243 137670 817036 052356 168202 213774 527416 783115 348272 941935 758803 321322 667939 908334 643354 263877 032653 286299 520527 960436 431606 335266 725116 700987 766370 756503 389026 860911 693806 857028 173998 316724 067264 954957 278537 443955 574066 718459 580162 658809 497051 533091 049307 737249 880395 265283 444200 416394 822121 592375 173782 848413 740142 464507 156819 444446 175129 720653 245145 788859 649665 386423 532650 672373 521932 953953 117629 487684 374983 577503 460631 705458 109628 284116 994049 897303 504743 595368 862553 616363 896779 034252 667243 757809 626321 433581 260343 310812 806614 993563 985608 320225 591514 405654 769055 166796 143633 468533 225217 680302 473071 707401 413407 694326 243021 244468 463037 365798 083622 976762 837726 466806 122965 636426 580679 991602 318518 669436 350604 543094 672284 451825 835125 376522 340136 564571 932624 853741 900786 273407 452231 059231 814059 472772 881933 603154 539164 833707 250297 405225 468348 684325 009963 272329 062373 120748 002424 727808 730425 081676 517378 972435 462820 605978 089266 888101 960183 994606 055750 648651 274949 737840 444674 229793 848387 277556 015283 988774 128256 891347 163539 819668 562109 557807 736488 021348 298729 128615 933213 875002 345257 219283 767297 712831 638784 611750 517860 172674 733128 201369 923440 670259 375603 286946 497811 793467 325363 870039 858276 961911 909423 338590 514774 664387 921376 407360 083609 258669 363382 884158 055445 713081 073469 886633 680168 640626 297864 675890 117402 640564 396316 517160 876142 230856 493942 937583 697025 785339 133809 337201 913809 034244 073335 421212 225160 907257 266435 587075 379144 754746 388521 612436 812736 690051 318411 972013 592388 303027 691801 415836 163192 025354 640774 791039 499549 831344 492266 515160 767280 807806 217022 157496 497052 476133 428936 421232 608444 261456 470721 018662 479910 372322 851523 122191 873245 305494 091670 244439 820143 069285 011502 800500 053580 338901 120708 384065 284374 062195 792179 656363 196025 682694 899346 321174 877700 144729 300076 358467 973034 144517 065446 970750 326976 365575 655095 895432 158247 599833 801434 323880 706865 079281 144849 703187 455969 982311 492755 701481 714578 758411 913892 907038 299618 222083 041272 614437 212955 835935 478833 888773 942947 615306 992742 843333 845226 289199 066681 325809 190893 935490 714942 680954 461700 566748 620560 474807 145926 079119 584839 169768 042021 789662 003119 494696 792631 963913 337196 722491 341976 007022 261439 476155 915858 486158 526621 028021 638778 051122 744604 818189 596751 684495 217616 521664 355756 941012 104604 800261 580546 429053 707247 347498 489764 487484 859641 275414 095696 218585 403780 097048 789228 425719 411252 340224 275087 041466 991918 203160 588133 823243 852863 203870 253863 681584 965186 453678 959403 637173 367398 617039 026481 337245 815739 819080 219667 777055 807408 326066 422226 274865 998373 879296 868348 769666 809349 089880 593390 906913 241722 001703 512596 062125 698632 520253 513925 833640 786463 087596 796543 330720 972412 681790 562914 246902 512868 722868 017542 394620 075614 470761 774955 069981 655563 386691 614019 060541 801255 282109 716108 438513 433610 717192 968665 246255 690843 255288 645711 634385 920031 994784 510541 038840 328055 118699 042695 455726 435074 630535 797032 350587 914581 205212 292133 660827 893782 229472 932037 265470 769465 053611 608531 900006 844265 831379 355083 791989 190644 789264 249644 422921 655922 844036 324552 839144 776762 946145 216786 193704 062466 581529 574778 326566 190733 274721 936842 608016 419172 545024 725823 868010 972602 509847 617747 575905 352523 155337 910941 318918 909813 590085 126435 028705 581726 635113 160058 501607 354201 521283 659754 644150 458874 578745 350437 578265 981634 730385 837932 521539 850236 806740 516092 064163 196709 944679 428757 982564 358804 653501 987149 941138 409420 919755 355717 378429 969621 583675 729617 068875 791596 373737 993636 805723 531063 167205 808623 459005 507051 086221 052924 003640 503271 179884 467675 971929 524743 914975 513259 502592 840950 719695 270393 381412 381618 099003 906926 649867 539972 687628 412776 057406 411772 951109 996657 114126 303079 695771 034776 236244 245459 555201 090458 767679 480712 366970 164277 226174 577817 771569 015879 702228 092126 387123 191377 765050 635123 749626 706413 497789 874614 556149 889819 678818 546669 682810 550780 790101 084760 221583 331309 644664 935294 274828 294709 461709 879376 265405 048548 442848 647270 906375 867470 013797 625952 524415 695935 556032 896574 150977 449687 736685 177623 768262 960373 366432 212725 891711 920307 031680 962263 279556 747234 303410 959659 720246 588609 018498 031781 744827 486788 095003 447548 718185 795698 709512 860864 776686 765091 064605 634909 525119 078883 720707 050606 800439 122909 559018 048352 324080 483655 566317 128912 637314 773550 007105 300365 449942 539066 227242 785899 682477 552890 093320 207809 171493 893084 076573 224149 219411 026041 644442 849613 358174 355315 158556 010180 818277 003320 604742 004593 270266 717129 066108 433317 829556 797599 406894 840561 352408 180066 378106 341330 640913 166676 650864 862713 495458 988001 358449 427626 605079 310104 307331 971565 042217 048062 366055 463182 875988 612847 287079 127606 635733 000069 492371 991107 555162 789656 804480 702480 956242 908723 639379 823805 068035 107607 634282 339860 990497 596413 882202 971428 465361 767502 257035 923349 626887 675192 626850 957522 603602 215623 658994 427975 818502 252907 888411 327757 226595 828607 621898 050369 720917 120885 421336 682268 438570 888705 302775 815840 229469 409926 959380 045126 405482 163574 937927 440968 463399 251630 620230 429010 249832 367890 212815 152975 171791 614295 426413 044951 500991 021567 399051 257325 060759 310094 533574 158359 197718 875112 625634 222001 977091 501681 758930 646188 936554 622722 980692 770096 341676 665358 633746 470713 986160 908010 191125 980549 197269 100303 510315 860853 443685 484133 364619 097374 137069 734885 668518 942516 112398 962629 306102 199651 795640 435182 497549 265518 210637 562113 802567 237494 682832 452639 043398 388600 642921 199739 289169 346894 988591 792770 200654 974158 006298 898412 144728 123439 652245 516700 065588 315931 207606 531330 341610 832233 451604 312465 153533 642226 167411 563740 335820 413550 771155 609859 640787 673482 005201 896167 364465 656864 822230 593140 120848 996901 732328 146339 217015 339382 319969 705178 747811 598690 342394 541402 166919 093616 533825 217892 713462 189378 664173 530289 818178 091121 428680 324450 379019 253529 870734 577913 049040 475865 810112 447741 865613 181331 587307 173149 177709 701637 471295 592739 439098 414602 281549 794311 411515 778336 744252 421989 514724 884134 851710 205572 598566 100067 872723 517010 082515 515422 344457 856269 600541 670155 071165 990235 082954 137813 484693 086348 173013 672114 333517 652558 548103 720013 981689 576878 861673 910736 639301 681818 562208 970226 092993 936904 663625 595928 268288 830328 627509 013935 823073 940798 825570 209816 264027 464962 156935 178379 192984 295749 901682 042926 757298 298977 723441 570223 706408 745179 694037 498512 678958 492495 372755 227144 255681 268189 229755 530490 127596 867725 630003 286211 371312 081992 788720 931961 083588 877475 116173 470694 323076 404162 315686 135579 545089 855175 642120 879517 103052 542877 500899 970294 515976 074658 088275 621845 693428 385800 364512 609028 260020 855720 615260 015985 624427 783035 237222 766600 065247 617560 429273 719639 239266 283159 649097 077152 653412 802012 536320 286855 566877 056543 076884 756373 845293 627104 045502 084973 697053 830841 358396 549445 802014 433209 184965 808312 713596 079094 084289 965918 350946 519044 575070 815641 278335 843641 869633 757907 820969 621700 210858 947699 425911 500607 506393 736773 813847 379730 671945 196141 206155 891283 504421 719685 727045 725543 978067 312468 457980 207276 112758 672837 988683 351575 630627 152650 994316 540676 679816 046245 410379 031125 448857 791165 163461 488152 952773 344290 910066 561461 972212 498698 732468 332422 548283 426522 748824 112244 478997 473680 236024 257333 454828 190371 555391 297537 317061 057808 178311 601255 696218 681357 167428 413282 234274 656523 995587 474470 043180 321155 802181 574677 630192 683127 756156 508590 741266 173617 676550 352570 881244 995568 903017 661789 915807 480178 859824 809963 847097 012557 376138 850615 397419 036588 677491 376282 473003 357212 005734 672179 206470 378278 457030 600331 881178 980906 518725 700452 611304 179336 562735 581978 225507 800388 471759 265546 466771 725855 403876 568724 652698 582624 956546 414738 905257 590543 746109 413035 689838 540306 855344 915511 238059 731415 688303 924066 986207 467888 841674 012372 601970 989069 534411 254859 341900 163279 403101 231766 787207 667948 081145 985901 689935 502489 791497 500278 367840 679225 127747 778891 690630 858615 318238 591780 788003 857868 459271 303615 585232 497895 325547 485824 867914 645460 431934 999227 304298 589460 524074 752693 077664 349266 349607 715560 320329 124470 750249 221287 846119 115370 657217 757588 403326 332683 243879 903176 561117 898179 785784 581459 178322 655045 055151 953424 471029 522114 547580 557203 311574 306230 632918 445716 832225 172734 995424 087822 715100 433401 561317 518833 610100 853347 963040 375340 689497 562177 971688 173432 723022 431857 334178 867252 192363 850948 316383 340836 434155 852808 129809 004788 894643 200869 256579 878226 133698 991488 054861 060692 427759 119384 509491 304376 060723 532903 507281 016735 377190 599611 050669 223834 834260 578390 182009 544236 968105 941989 750319 872223 922467 190858 587074 343330 633313 676178 123076 572328 591315 644619 945132 019155 763784 905868 807965 757910 366488 506816 011223 245286 540658 194702 237011 746844 231218 067762 357259 083666 957252 293520 448047 699107 691434 110593 842468 688783 477574 121668 711700 645089 488059 748755 264562 023442 019300 613215 231325 508400 462731 369309 715230 174171 469525 097707 824619 714472 886808 519573 137680 221736 132282 180658 510406 092787 243073 263118 680084 030404 751628 107408 483565 583477 167107 075086 785041 165064 378345 264170 214118 495675 336253 256708 592985 806528 650577 252676 696172 618644 499599 568252 248137 005865 564300 979817 512494 068579 983396 207155 778181 498317 348280 147674 843041 684589 910318 300540 305989 621995 249347 575125 772674 016013 988715 140766 920980 899772 332889 613694 560383 789146 928515 839268 679062 395753 353678 480604 426659 812559 041535 006251 212412 130135 828537 001078 786434 584780 056170 063508 764954 797972 263494 091532 169688 611622 180262 281573 845356 713232 594280 650369 998369 663519 836773 397002 134151 564550 245997 458676 222730 927983 362556 141897 446270 739135 601456 174484 988630 297546 977165 797659 789435 560504 876133 947973 923157 571498 694130 659199 830478 740153 887914 138767 495552 581586 392314 916241 351671 345912 007052 438979 745483 860533 445205 594961 790479 461840 562979 944699 334384 558278 144807 217438 495949 261684 759273 958807 579883 728196 815300 578577 192256 973331 223227 543535 012150 588474 922218 345758 165227 439596 846390 972753 313067 062938 653329 471744 356511 697452 570756 973875 553997 394463 918383 180099 765264 042621 361653 260667 153094 932979 444437 566838 855222 643292 812861 995696 771741 811359 255715 290148 694809 034144 837894 474528 076698 558550 869247 952102 522291 441070 269665 943223 675235 037365 502691 520488 416573 963189 182228 696825 082953 284241 963104 824251 011139 664551 990068 836816 873070 048407 600706 195096 047049 223037 896010 452421 107373 213354 863968 290040 444166 951406 037884 693721 942831 234929 098534 902795 303317 827574 802386 955896 547905 408791 457357 878663 505415 671824 886050 382552 649299 761709 037651 689830 214937 070800 728764 348596 453482 791525 992381 237433 377209 409639 845813 258766 016711 056257 565387 422559 011392 034748 140943 702521 995997 784773 678838 738334 458328 340657 344703 263594 930672 919738 612188 451104 532909 977438 349924 324732 072222 533734 578979 127660 639677 624379 220226 519594 812080 837652 890394 258662 064499 809710 424835 443526 817976 990894 480323 722375 598948 601526 682115 603634 067908 685014 380732 314587 896205 510550 139636 128713 623107 416203 351123 681570 598647 109448 989494 927876 506122 149544 798737 237029 707368 684404 705490 289830 310532 878947 678485 809097 098499 684923 379141 898211 818813 589353 321074 765035 674257 842289 180813 500964 131344 202116 604613 348296 821463 417496 885830 271138 151358 719440 363748 440017 420657 008117 750887 850279 277841 050046 092530 169236 662224 920187 040550 120899 072888 174134 957726 211271 615870 181908 215030 408114 368091 598886 780465 285592 288444 557919 418605 613014 865131 853151 660619 364934 137684 259092 779563 745129 817182 636858 887370 407979 752759 022091 358249 105981 679201 142335 925426 535919 739146 210776 013219 278551 327932 985191 233770 706955 833401 721227 849135 966120 922872 674680 180719 513235 987485 301585 664886 881122 859855 623751 688282 591980 989112 226277 592446 871007 712858 458713 165444 985353 282203 745192 312708 866884 431072 572728 895615 935625 016519 270856 546324 813225 731608 350766 808846 006918 397910 584137 120076 569503 798138 174744 296914 063406 503897 483421 183021 911643 034731 972249 883258 857083 639458 537568 463557 192731 413304 400085 732366 193066 011555 826997 655221 829875 418448 253844 385149 830546 649421 009388 977793 921338 820191 374883 827427 295213 180044 581756 228808 631972 262977 490846 802146 278746 405128 540058 420911 312577 950603 302045 270790 749111 341910 349883 304885 543386 719033 047474 312397 206956 239907 039311 206469 660011 675001 107175 181466 324369 437823 252808 690514 849019 207422 254959 570575 387207 892846 009700 197998 045633 448329 708411 754112 375736 246150 641906 738680 815389 188256 880914 045846 242853 888059 443546 996670 596089 933058 656883 527742 104639 718330 754492 169227 134449 710879 083112 683010 416409 196963 143679 997801 744697 273228 070426 084140 695435 198689 272306 383107 177801 395742 599695 363495 969590 379855 576873 889801 854803 006742 430539 144457 302753 602718 395246 055992 419470 281443 788404 217902 180536 138614 979547 880152 176105 471153 954638 916359 817895 719989 034239 903609 066167 314766 209271 544020 355718 243361 114419 150707 309853 306619 517281 843627 186574 768327 479687 295617 769516 081411 338910 167790 255192 987409 166860 405376 751778 549165 917986 378087 875952 149040 708573 031638 870693 001249 060214 821395 681243 267163 363335 354488 581255 713725 319404 108028 992424 840509 858336 272641 333735 920704 641573 447041 474687 993665 493412 373907 347152 274130 493501 271616 164711 166288 426777 247741 792924 633899 543069 405185 010332 882493 511493 645885 606799 241462 151891 006110 048227 986619 770244 238418 667434 432901 257791 482745 258005 115148 219366 343387 188911 651254 871874 829842 107496 067380 408925 409744 757400 899555 294313 022773 083640 444356 642638 581170 918678 380014 296216 854473 987705 033820 055376 572098 581551 768572 128987 758507 563073 094424 176295 652114 606842 283248 334070 954920 406147 998024 053571 659813 285450 793554 243113 261316 669482 445475 878300 551384 394727 661635 169566 411792 216574 420563 533725 159262 361602 034983 265241 665678 852604 917777 976564 582809 051881 161348 362104 935468 667908 345255 154023 320448 634454 866572 491972 553843 776533 478956 234395 118287 759962 095959 296031 324103 398049 578931 815313 012283 845453 726297 741479 577917 508555 526095 143730 752048 931579 003343 129311 837237 448186 493105 017420 566060 626000 795860 250229 105938 828407 860022 427833 477925 505882 860860 873929 180692 204512 126577 326173 797972 623816 230870 508012 630525 816394 075796 715229 574273 090931 352407 634095 931417 764561 049704 375889 741874 742681 652922 380862 093567 997117 732662 106202 193366 520344 799850 903896 837250 248075 220000 223711 155075 636398 417566 441094 925906 424931 388076 368319 031730 505461 031811 704761 942738 311662 317329 630718 020820 950563 549116 028725 810778 467282 848065 022086 282937 680441 601658 367044 154684 463046 768234 745015 227664 905832 438617 202515 237202 617228 160950 270872 485377 642613 464120 400441 955951 247323 385903 499857 848829 047444 697768 185951 474463 202077 210069 908432 568625 012969 313280 433192 736817 067455 138906 954808 453849 426339 172540 200900 728419 097361 908620 861759 444132 443961 996868 203724 782988 924401 397697 258500 709106 800551 429226 336744 149674 784611 331250 556850 010079 403216 131186 734755 526401 828369 671236 136504 750845 817817 812099 043432 337549 655069 925667 004175 761076 356580 331350 014224 571392 327420 562357 279103 327943 270858 414757 070091 856844 188841 099081 191468 089565 897248 312770 953678 314576 605743 847259 751220 103772 118410 479596 683105 905105 613144 835837 826942 163470 058240 365910 338510 178827 310931 472439 401108 790688 721028 605014 676637 909639 307563 056341 330694 173938 857265 060667 921807 198482 985503 572034 582140 976801 675979 935078 278044 153608 206696 520083 522502 020101 293648 518310 758896 720596 892242 182043 661767 173385 436364 616624 403710 105304 624458 068256 214613 640261 813510 699050 574114 905404 029261 230531 532084 396492 714339 512101 138410 999043 053531 244723 703324 179399 423449 524426 674385 351471 983250 826798 399604 699838 864266 582408 508052 041716 615270 031222 563175 470329 522098 812025 551265 374880 324708 627466 498843 322539 907393 537705 903133 251129 702171 660165 679456 331406 261482 072811 228609 451896 704092 857525 485544 144714 977095 936188 936928 921626 863227 185657 810663 885243 489568 926985 528718 772193 194336 271777 103281 055071 880957 978468 860656 794881 158819 087575 449802 063475 259356 027359 565682 826480 177245 256533 748759 297897 986673 380265 781748 462213 960734 200607 518663 793516 573187 303216 293098 808485 308193 054323 790155 576548 615069 757066 811058 136656 648695 538036 368545 402192 623892 337579 260053 935670 096285 494532 088216 937470 393140 667670 524160 235607 647790 150310 801743 297805 203392 750196 720176 601796 075346 179112 899414 913457 563349 579575 816810 392709 503791 486064 889944 249912 717537 263145 292942 473903 337924 192492 511967 457516 846270 854026 959636 336693 274772 773311 436987 179009 036009 305453 038419 225505 514134 380607 641593 857521 226571 991821 278126 997739 607512 470787 607928 424896 394019 741751 100808 770225 920556 946904 373118 981451 565894 974294 479581 867124 573472 437407 045317 472057 814791 582656 523265 266117 906478 459486 569266 557256 382646 432800 014839 775094 024279 944666 330259 723819 125283 916776 265783 106230 711098 679350 922013 275198 622976 066724 083317 393171 875383 962971 837334 501294 667984 189392 300661 944892 283876 951370 728526 806503 975239 717080 413456 526374 123195 013739 431974 879656 564175 976676 834887 477546 777154 425381 998487 561242 756352 461473 276388 106183 402215 530361 532437 581334 071509 783842 428779 099080 913354 104651 975704 850309 553482 460544 441512 860553 612453 370397 341430 490717 827327 206280 320274 334888 179661 717379 106285 256357 751789 978025 206885 691782 927078 934426 173465 818025 597891 964097 162456 493909 775838 794783 128646 773404 284725 923178 559166 513956 327514 430451 807784 035869 184365 420257 109225 648472 662925 333597 142813 357639 096488 529757 105455 822824 729437 237942 843836 469572 529679 145988 520236 976956 346167 963115 130268 522612 029323 330296 379815 774255 070841 911625 520108 284245 366572 259745 178785 556515 173609 191162 406748 623721 118368 865606 460718 666506 632079 995515 886379 766356 725390 500872 891890 850132 678698 471181 054407 761100 451222 130213 474081 026604 263231 936516 750556 417629 571220 495426 949660 222936 494170 150960 045981 902962 730537 039532 087616 777602 717500 909861 744700 565203 092025 485735 816187 811267 919598 043836 753360 483811 352773 155702 916794 009371 575837 782032 072611 853400 397654 816563 601050 437439 643941 666221 338240 440194 941708 716751 643297 764337 613011 141476 070909 850310 310297 935168 872478 309442 083472 895949 348171 946484 272259 552418 982305 841594 106736 452454 077386 297745 745109 667827 673404 014520 715926 517200 513440 040601 153207 495161 717885 847656 603877 859007 231365 155090 966458 859090 823507 207721 353057 659297 013122 105385 181192 885784 128586 932500 179603 580379 737460 989865 323974 563274 050547 952585 739490 458054 382917 249955 062843 774449 703338 668589 426535 744568 817883 725934 937022 264003 393544 006506 100719 549413 049911 294909 146339 615584 342195 382166 572266 887799 726157 520296 551218 649009 876990 909352 917820 147379 296681 841442 592799 861342 385267 330946 265512 159209 998975 206171 178142 767732 141330 098494 377045 850906 445270 804220 954358 728232 972229 627349 742064 915525 318355 543991 543850 895261 298078 449276 653521 094021 395859 971228 088021 752216 984891 418579 542318 558900 519820 294438 919520 077377 851299 620518 815424 616110 227080 555677 246367 382913 260455 284279 330583 494672 499153 969807 312492 520288 131158 132891 716443 093899 894225 410526 700639 811919 196759 023476 113965 324132 990436 820801 589080 765641 024268 954612 857208 896846 198775 351148 453126 322515 487512 596229 581899 630798 122909 818068 873002 330545 570880 159109 119802 112133 780513 643379 914048 809768 001075 788925 139567 012403 481850 494724 137250 522916 408563 982524 708266 750472 940364 744130 855110 793925 819030 290093 592137 090627 326237 573656 318091 319519 056278 489346 041229 522041 944945 362906 144285 671866 387187 306219 355992 208653 773068 972094 394062 912812 342989 259157 135587 958427 932241 237966 058826 846543 373757 882336 710085 748049 986132 641281 959333 209932 997990 805115 069782 322587 371124 873900 885440 526967 852325 644718 353713 505193 101396 911687 380727 524263 262189 183293 729553 667280 066901 309160 697588 496349 993424 500828 868295 707203 374394 353805 675967 120673 957008 092368 353202 025692 151825 656477 755822 113700 771332 310110 144504 225560 629119 187642 227689 815252 597099 244934 289583 025724 165450 037128 662259 903860 375584 459896 822072 669521 256993 439056 966744 355009 816959 517896 677484 775830 837078 431873 463031 063786 943862 280572 397243 894486 133004 036788 994013 912659 891520 699709 413937 463763 398426 750515 637626 554586 222454 645830 273341 954860 652728 364687 571422 335674 821031 332669 721742 109594 858348 685373 058322 658219 447842 328134 830082 884431 074677 478728 325102 294294 618555 664761 473398 635120 067139 694306 876375 281426 256783 551899 534829 644129 413048 820069 925971 885202 646187 961799 859284 146148 639823 032707 823160 610460 397497 825858 049382 084685 913215 372617 191730 456007 560505 175980 841623 728343 442899 703300 714315 315006 731013 969509 108454 637355 159647 455599 816669 606240 612736 335409 020148 246707 696957 761142 318950 060877 317088 636939 015387 721311 257473 972787 125061 362909 338166 189315 812493 761439 071198 365148 179956 706598 186206 558641 717583 311489 828295 648664 282631 765630 684835 119362 294901 388245 524354 766750 571427 941049 009528 316309 886289 716604 410722 216427 623907 544534 115907 192833 648970 699382 449081 769743 371319 395916 588258 486737 269210 839116 586835 804047 983987 583569 977118 352358 892776 594666 497963 854984 265995 495654 940268 737673 904219 972954 363885 701266 123223 707845 992954 409708 668405 690936 771960 619277 964604 223205 625624 364571 831924 428235 909940 128141 719509 778376 458880 026891 126655 022040 998898 237660 356350 905830 835879 562988 130911 258269 521198 341106 698572 268046 922477 203913 878707 453292 158696 513192 633339 044121 664469 761286 840485 441457 502262 473620 522288 175105 003572 246888 776233 481127 499683 322590 886049 824792 590223 367469 812158 054655 183086 850080 127496 317534 492950 475869 770240 838298 705693 857007 336564 426089 396361 275077 717227 145172 410480 285937 238761 991937 944530 528491 962893 143336 784209 037442 043282 761036 342923 481893 319993 705180 379286 359469 827759 923368 896710 572479 753673 362363 719785 3
with 27829! digits it peaked at 1.8Gb of RAM, and has went down to 1.5Gb
calculator says 3.8924127543324053982435459283012e+27828
im suspecting that either i have memory leaks, or that task manager isnt displaying the proper values, (im not so sure its memory leaks, because i dont have any underfined behaviour any time ive used my Array class)
Last edited by luca-deltodesco (2006-06-15 08:28:19)
The Beginning Of All Things To End. The End Of All Things To Come.
- MathsIsFun
- Administrator

Re: 1600 to the power of 1600 (and later 16000^16000)
It would be good to take what I have done with the Flash Full Precision calculator and make a Java version that would be a lot faster, and we could add in Sin, Cos, Tan and more.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
- George,Y
- Super Member

Re: 1600 to the power of 1600 (and later 16000^16000)
16^16000= 831232460999333652239585333103635610886900466185671504606004315200220906068523\ 469713722100299463513721982461601573667588699938507317028143778331910759502182\ 695990576206254004390990981773923736351921518598129245427682295805264626773846\ 198525221723061189844462315898785804231642365367858585399149956132155655007346\ 102919467985430746054275516691741894892774395037022019419930360867146009363035\ 185110455484349271011394535449699954421707888077730390023783480171808548740647\ 553141564070056046579644675185442040286595858465190103234689178927066857956137\ 162066241856911660629592881944588549972080980143257304561781247061566735480914\ 196241249991258965102961351331392214227844098396336269300973728802085512458250\ 576318337486861531249622498085134452754460580801360571598892494367630951876992\ 574684196762128572040592899183570939625675644427031347614766127232980033882735\ 212476888027952722383065631308896582111028140904006860785234744589738595159293\ 625605891434180236872836737823196870668641153798750407704595761177715745981317\ 042949600595652220223508130824156509663609489439388066075591141916365560853065\ 483610404902041961150593607651152920713818731969321061670461014374887468915108\ 542864156987915569333952474873266880221270785122013918146809508514515455921034\ 726100315108810097092210983269543800901553960080869460944860335881666457477723\ 678798220445221592798326369783954327025443624907817774016171117822492748356780\ 314030630381877017550218276707426244889087428392205001707960734974046422129141\ 801917128090000714302235811420307422605890332523408964860320984025697735648679\ 935568956653467650266564044820460227251682429822890817668971229165743394654067\ 161410843551106150680575323194124869872983281487721066248251425351543182772056\ 730627414424446971970339679642217697699182355350977982481131614712234580349755\ 724847624052640344585867518414417692097852378381266912062331344017573681198451\ 488122956412946442593282622015856769510926596507197903339494033258358266427034\ 410320196518886592966262398999581213685951812679556116898849798236879991482507\ 196730911456118727645215375631771745994330452570772408878087137198262125780594\ 354830515261402698003738955042145103076435012753853152934320851871540173301043\ 955643627331684430101895248473363652453574213485575128702842321401136334841016\ 173124309533111599569748568823963492850816411744358608839601838589709099362013\ 318338606202211050485797063742818522521693078944238673155344787005559612911566\ 953761728941088833907671108214475067779519376877089015288463175866293244376775\ 208993161075814619129939137082842747874661485114703619890101850042907870042381\ 871666894822433966620355669348403905086641552941375739351676805670457711996998\ 314077280264084776674680044857707921520174398629381707658973904118535251406673\ 000578586681104923713422383071367026543061676762633763039664765892751912190602\ 656560811646467139471984476175270211984131436636183292832493653938728054999167\ 283790173743452189290100125136077680103924105688890729019050864291157515166196\ 661750547625157701570793428110188105063731775653181103991899051548929459398049\ 951547526116520527759171311464205005339695403482575954316678439885563841625380\ 574690585926343360692710031419594584595347693754104231773913439089190160026061\ 420790820857891101361485070287548074693546817628732738183966004272869638032926\ 375594297916789754461321798115086008578218765317401979783465344175062275648619\ 281048132125579835205289969290528152645414364500458707540354137795127489166286\ 777719220251038830297145379249176158016860852496402661096273805580249685184838\ 326659019284065428902543094813706122525202904469745052158732955063391633348641\ 090984975330794177186957159487292662540208420094717229915922714685995655530640\ 184366533519477510080367646844480392903033693678051162281082054294934929315966\ 284991995000854973168599760937387162855735960161223715922643222478087780082762\ 397964322609317578184523337891944817879661292380728082850217628281808554964939\ 567859561191746454462142402196803593231431371834094806330934974599235117404128\ 389816919470547067585754931553372845275907323855316573988030091007643090410959\ 050748842139901890170115303760995612375761087314745344843621612531031202346261\ 465267991427065792640813942070235016300547739356471827725718304908347472558166\ 348485634329476242899535697491736012833447798149028489593019411326329889582643\ 449196771205682529316539377733784572641875942523533268259593054492831455169989\ 136401598227361201514641862488659230108984589162974323011566790975331321500625\ 293658468646067406539807095301717349455995010307058553313746004385392551752649\ 214889972781707644091283767790398383644399876779291400195413756803218827040075\ 775231784702283721128155439762408998002958555097207381113152525280257034797712\ 861688919566936142697897282397996063270847218942074397316159208643648966125054\ 673315883813259979709183782342851928319959204417947663182888267926559461422627\ 798194838079071972671075313752774723952434502609194189770927325170050404392361\ 994810193245931717313880364425052426042515741197116591527439710454034421054841\ 485537062641257299496037829944058080116587162529561673857817098229582456867315\ 841584667000465364241921206955754119860629078620316448975476328939798348496332\ 768994708671477719277302819601377270351707460695905438349428761549024497059874\ 069996488384187205191962353806109939963293056269872695161841683954335995478125\ 118714913148333921254611177761318621466545973182679091300341065356413978127734\ 235974089444713470992822553352399805306626690993509780405742401557237247096584\ 759458004578812710346531737447297454230658211986966959670435522327618712557857\ 273858402875349205543875742090658450008658788469893890470982730135211133211191\ 129969086541726318403283806772077130427007332710793656258688214667891220231320\ 085156006581457118117899870230849403238997749724288242649503939736464695964302\ 362718333688750578716724241042990518443446556760712577823358606908104792639651\ 107896294982807760051022722072273942482530649004435653116883282917652992266926\ 176590626976010160497995644175515821052426104965585082684971023257001199468972\ 400607641170842127591608018382261452928563057874232814823526088933665633704971\ 142543954861250871031720388228490998756136855785475780294875796887185903443112\ 817588929414265123027751655235160141968656215138992461077239682448320758009604\ 430507090027464979576878653299455139878603273548979528805330249330380962349457\ 607863660284378593827575725877669717080832086273773967207398057378517736899026\ 147751553937125631793926387584095381631210218981553638398934491984777444348978\ 639463290168998064757108860644379821816381521106932874075667116293850590102308\ 019533156793580682673689891617402646982060521709383989735498429192658853238229\ 564832481645241308861808952668467291756532031662630812082735831926347941066426\ 631318933456571366647447779887594915264953819359923658729254016762350150054535\ 494600336050236450269133588225723698723706434371273808173630189268373505759991\ 957646528292360221249861842458269820070379040760944072478826150451092882452354\ 956103695062417348348494333659498069455289892357337078630870158192844895951794\ 115978503800133786729248666041310453502919291239435896380436332491366526693809\ 876249505419407694537537960904380216226127607444279119619979484150649213511664\ 663388047300096045915978234337526125011436480775618254159673043700398977905886\ 443313597141494302049199142199613015582057423919563900110690391189904389910802\ 725757758792017443453252739704970834278190527338448317376572210863150262281672\ 729977232760305707787925990954682420741894328477650507533511032753964397240410\ 444860814314573140363852156145927263862142055757746758119637186168590338429187\ 883799962883344722519810769477422734260313985360645423213512546312446574817556\ 318108309434496702851745384431039302565988220291013523218783485904218637110566\ 114712051561585739649874688108013147254278037214825737295719100645187610665338\ 907492851108845437627657376281164701028472606540038501098627437980887104149249\ 716373320891964283382327861431746922902260053680347394087467392014426645159983\ 640277825476871296642180283223795591428484435055495950621774240135080167803442\ 826015518858435078179158448462388405487130646097618470724733049392518748087166\ 361988645245613198472888452504403028087116105623686431804585737578927468500268\ 919876370365298980365459117447021820539493374169651552837143635124225941660985\ 740884952258029938769476739045983081509506536538216187763724088509380512867509\ 526058985895223378086345811644319487595742825726034880362430339399091556132909\ 774649784853608990750683117534553520040882395568418270276911341436640469885217\ 682894810581602923344808754269464424044365394289392341096628999492413762946318\ 323110883309208350921908677117341934897528373970375690298456390932760928009747\ 591530438653692450802286192612298741435142883237858980299081421452830740129172\ 000399783227563177856401957926283764127739370160055763309809061530158645202614\ 836923402461932922207785693799960718833634002476634842823119224614840403888557\ 435991747739655187535789453247933141682455125902831230691067498630691628518929\ 340609411823303263014863171754996361289366284551735771374439805859900448954500\ 423874702226453294972837197429088308865851746242654038444866820091500636017024\ 070721687171725905699493718808416262987446248859763109341768097956041516781646\ 186540012719547460131743221589663060011738067752137939015257339007318680218642\ 153674710015914938794384262131874082926681587389379670557658707094762208173393\ 933040738428792452574441699791792587056226899320493673373351792079275872778574\ 451795790813039637424502722123183331136292863813266949561492366623549957006592\ 567180719150692419080508215371608130771313032685207169028884983323182500182815\ 963818459185579260534569135586081712079344277774039815470193579220545066789933\ 915736587752829996224119253138172749819876181840751046223536422679936926057234\ 604966600264861413956896819848383241877923915022109807797417244377848014786952\ 353617587382563997522741063058391023616084880712543935097531419977165044874415\ 497760263963925031601407454358870363662958774907885316398100238615733891533832\ 508265095819725378540104405405942181855263882648458320691410354747840160766026\ 092094016514767440760332497130897211210133402211902977134966081696443830158975\ 580635227516472306045301590965879841227418250810956011533619536718242836153952\ 417941871444445602807490213018299020351288499524256369326198896700452652327415\ 075464445174903868096901655152038659966764407425889187136500453085089526976400\ 704249048193685902054566012579395842855572280482053824872263554112155748239771\ 263680276461831621019952821194080929635805444035861033657552293712096215630335\ 771406506691269145112583031647761734807103538004641072637147813157372742827519\ 466134425998299449229213650547476786553425331437183310886801198118409893949785\ 017162220151808002245079369954695087471073606519147520497416658635789154245278\ 134742561348902015664376523895540224487576588521624572474447547241651086688761\ 140299723456557821194259311478468410536478797140088702565373917811670617441740\ 033310012202705545608841204868758836372021924437794474653873892627301837855938\ 098105809807600222722869444088392229874839509283701373918792849259960733088228\ 996280704355412397806745349627640036885359689412510467087666548612614663446521\ 473376820478179547336796832130777030621205571609513275815978379203511211651774\ 942817305585648612175726603004497821760019394583881396019354146414870510110964\ 825070674785791423143463951665499613083235245195226234739771526423531284833814\ 121478051248831477847993347535123150682979456090904989392711869512448045913296\ 175870861726945190855265434786214659085417720390153316144684747873931371309388\ 241824630304179456187542552486165328777573442884807382388484521210544523894612\ 497963574821978691552245772993554730353907508756793966106130232733563045753569\ 447140152548621957803392807157713478677743901643975532182080516170269158531999\ 395372174243894062418056280644459110094968445667571753955084282552200931922534\ 938152018024131139584168290345147517277806020379748695446239745196352660125892\ 726079216786027852599298034170661043698874558299392469966750018935530109467589\ 124818067356899546911430265875136161706787284852502055306434912445605146806754\ 039403142548538442851871979112497080829006858703056573506015727066388189493000\ 381579833979415078710740496240915824966895594336075032029590099481343114179961\ 667806109509871550547254582163118074738472407869676157716148432119830073972087\ 998431716455340617847334942516500794558589362863268604639439770454464035994348\ 781067473870397098138557410730795614819915523379889896315858574638204972514946\ 609952331790538589062507043934523171175552591230638611216481470948902431231977\ 477674886538258592514138381940212040191670226591527217144738070320976833745262\ 154250136398021723274512736212574947681117130680814308925475703622819105885164\ 536668677322061453806434851606159535222510953874909213884724515413885741242150\ 919414834902298047037714540741108446132682382050986383221569291441919056633721\ 052829468931997410053199507969551650668673681092697352490854947526399864965083\ 441121400391032379625951101520647676023597440611272325570180143023607102726684\ 163984013439491619570454329835936020710510515508167423858368485621534724103937\ 012427633373050143557658360346212275063360623923611224460509457807689828419120\ 344318384325994218046184748791622762517503478093712548617776440989088890694588\ 826997322939860400563168461619115019838044899104563698232059298144547317839188\ 047632545979746107067976449491430011957655077476796640614668801727912200215533\ 033549194792937045324312855941416933590586130356895978735685019406643977341538\ 707879737172978795513032650505140847525784452964070458045164089768366811925468\ 491177492978316802730567955236788979027702328822521977959467727328412784003309\ 275403119529693008666674463329106070954523983736872757194615479084317400826292\ 358972985856196153429850516948928674011446481382342481918834517434220826025491\ 969697906233235930964479417867675356916229655975381898491088263045215334922501\ 892453034565440939549052522739269822549709249148468413759914944498623601204325\ 028308660787544412024257458175629538931392374291062744094752647506253962096281\ 562125732412958074355262989259639696014131388970372534687378993594775965684992\ 047150423172208126702028894836461797445407845984244387201783362719587828387332\ 051701847191591323734501809857197367551632894141724034764582234912053139099711\ 848785753902970284520077063076329237817919922601456621759191873947669779152819\ 735910848481289411103303768427899592090656627865486972783617334813739966847800\ 780549624887458922817613545144796277446855032623675277052572059696975676582744\ 858823343549995330734695743070156248028691370615064594420921670461171050666961\ 974096857250824773308479765872204897271936288176053197711559959907272012058673\ 915777591962455426805065264977820713509062051392078727046626603797960389105516\ 264384533999630168352116799617692597994923054962569170927348951601249047205082\ 838075759796193846693779922554086312973817709930951506423499474980092517426701\ 505155974915990444074915643750429572200118627913568053576641240012754418411674\ 666651777871802502671856802110965424810374864023085225937358039690218272022374\ 804756819946224610126800561579823374126027048170751323154254958315134834750340\ 907379372604503281767805285628398887705178156787223253005326934799713613340611\ 745010567238037032415292602751432367400779817528576084192217361163229622401698\ 315186589427411353271699420446285476147569674314052798007200928000579401368205\ 600377217773892574367466137975892754216575592325473647429144647682618835443531\ 422446916132156298039262153734913296334494688833530672765600493855441076743335\ 289198024155497966368300152086211258647882370210471243957183619780408806828963\ 115878540391349573918099323821536459096962294523450373745169682052265600286711\ 800431417027080748027527201402187101003138106357455593534594149295631664403105\ 193570616283878068527779932942540243726563442342504059620598339006918922493575\ 073162776534995061341306512631731582793511809214782349525109554955779490387979\ 001464805147186428563027173931064009712973527877200289956174192071843275096637\ 327923784404881691657634118829384481087883828436313563626504076242223162825676\ 073532821324690259703283234697366128775244642033000200194305548880021625193776\ 370626225699874871004113184734254949454097402499556465350110423604647378905830\ 502410233609071017258207598004416879308627056950269051452229855794532239075840\ 628542475647997991864064419987045617171697873381661809784712029659855229074974\ 748070049213099945977909219887732253602496256986763973253070055028919151995988\ 722091763791167209204657088928708811713532691119623076180262989584850492601212\ 007227304697541899612261177969101718977319681492459137522192089997099439264431\ 189252926596126429597872172129570903512906636093242246952242253090868871172032\ 480874426176172919077396812519286237350809042774389913813268740481267325471476\ 140757714296249786638481394284689893549022468761707739003186637427460921824940\ 255571873595277523379348692067453209480217132718746042616575181027855115708995\ 559006179841343804824853505070997913321948623566214526429390148374675291397081\ 461358728439950450410782132382719389642544716739218267180092012309413989542849\ 099597962420713897432858290630909046265430639448555214401731937224968552642040\ 525284631935096565265981386942861040379837623942868312412650665345446963881523\ 389721802718689067143801459543074927631696532809496500354301951608264691654694\ 478941287694636061232525949080508876210193484908654781960527666686326693830802\ 636517794157640725877185051365023285146213611413944624440143258933849524401171\ 902676228843334487518509726186224495972256374394997429329843063464916661988115\ 035284083994484629235182835051374680409380559026619117644569792127237812356409\ 568871885274810770086712125955162812029018322525661484294755818125518091325220\ 857472664013965828292381450320785108924611908826936192961951316924626557009034\ 496665103133032429652616882196517514375758352763427234352727385689354135724690\ 105394749733143454929979803089418173074991744971176674601266220443495125704218\ 416535065090842274317573178097931111085027364640596147154216343848236433500136\ 311946350033225667951603063114720217494506588015335701433095708372802715458182\ 933640599204979127501359046319069946682540601970003378688626597456788285313058\ 475163927367098192301851398762914088596960110694294848270608120980949742639917\ 034813462151433939131148920482756357814736525612059754565499787367965695679963\ 422184948677123434825356330512567130622957990271647504563514773804702382521709\ 211930776641771438727778356424894249440869141793321575469634577944332722788396\ 560215252960447952100046027185164962885685369957974318167549201655348035801447\ 851808437495604656902302999805633582446996355778992185300479589487375115471107\ 015158891109713868541458493556655839915912642730672321947545151395798346887345\ 507064122334845737551650030466080238900649693630306292244958605770391333209154\ 619845554203583683546141285043628223986044627188137336374968632499626460058731\ 612885747313863839464092259735662354247400297810424791071242476818152196097844\ 289638570097624044813738881733845200621467034892961077427780014031263874604215\ 433966143491638645081967029760853027075199486710980366439582140337369041462882\ 421529478385559856627789245880630690084440243873183365547090153735520822581807\ 731677783908775116048655955384700965595193283907089875740094855711555768549376
Last edited by George,Y (2006-06-15 12:51:53)
X'(y-Xβ)=0
Re: 1600 to the power of 1600 (and later 16000^16000)
Can you tell me what line of code allocates these MegaBytes. And what operating system and development software are you using? The only thing I can access perhaps 100MBytes is a Windows-type of Euphoria program.
Imagine for a moment that even an earthworm may possess a love of self and a love of others.
Re: 1600 to the power of 1600 (and later 16000^16000)
John E. Franklin wrote:Can you tell me what line of code allocates these MegaBytes. And what operating system and development software are you using?
the memory is allocated inside of the Array class im under windows, using Dev-Cpp
The Beginning Of All Things To End. The End Of All Things To Come.
- George,Y
- Super Member

Re: 1600 to the power of 1600 (and later 16000^16000)
X'(y-Xβ)=0
Re: 1600 to the power of 1600 (and later 16000^16000)
Thanks for the info, guys. Maybe I'll get and learn those someday. Very powerful indeed.
Imagine for a moment that even an earthworm may possess a love of self and a love of others.
|