diff --git a/v3.0/README.md b/v3.0/README.md new file mode 100644 index 0000000..af11f34 --- /dev/null +++ b/v3.0/README.md @@ -0,0 +1,537 @@ +# New version of Riemann Zeta Tracer coming soon… + +This is a standalone Golang implementation, straight from the Swing version. + +## How to run + +Simply init a new module, build `riemannzeta.go`, and then run at the root directory. + +``` +$ go build riemannzeta.go +$ go run . +``` + +## Output + +Currently, the only interactivity supported is to give a single evaluation of the zeta function with user inputs, and then printout out the values of the zeta function at whole number heights up to 360 with interval resolution 60 and 65536 eta terms. The second phase is repeated twice, once using the single-threaded implementation, and once using the 12-threaded implementation. + +``` +Hello, World! +Enter real component: +0.5 +Enter imag component: +7005 +z = (0.5+7005i) +zeta(z) = (-0.011444324131608216-0.06464961257910405i) +zeta(z) = (-0.011416857618558924-0.06460266504444127i) +zeta(0.5 + 0i) = (-1.4603544908226656-0i) +zeta(0.5 + 1i) = (0.14393641589371903-0.7220997580797546i) +zeta(0.5 + 2i) = (0.44054566981359516-0.31164633736588626i) +zeta(0.5 + 3i) = (0.5327366607849899-0.07889649431135932i) +zeta(0.5 + 4i) = (0.6067837478408963+0.09111212095473921i) +zeta(0.5 + 5i) = (0.7018124002974415+0.23103799663639735i) +zeta(0.5 + 6i) = (0.8372238100946673+0.34021843924920764i) +zeta(0.5 + 7i) = (1.0214341698570244+0.3961894776918339i) +zeta(0.5 + 8i) = (1.2416151954037284+0.360047500907452i) +zeta(0.5 + 9i) = (1.447642295020427+0.19180329349265246i) +zeta(0.5 + 10i) = (1.5448952915316225-0.11533662271058644i) +zeta(0.5 + 11i) = (1.419650215407981-0.4876752676532131i) +zeta(0.5 + 12i) = (1.015936567050015-0.7451124493228328i) +zeta(0.5 + 13i) = (0.4430047871823344-0.6554831801818203i) +zeta(0.5 + 14i) = (0.02224122393821156-0.10325809156236886i) +zeta(0.5 + 15i) = (0.14710984044622824+0.7047523219755553i) +zeta(0.5 + 16i) = (0.9385453357085703+1.2165876914004659i) +zeta(0.5 + 17i) = (1.9466550871709984+0.8954051748327404i) +zeta(0.5 + 18i) = (2.329154312080678-0.18886572502254867i) +zeta(0.5 + 19i) = (1.6224961026787907-1.160117645763167i) +zeta(0.5 + 20i) = (0.4299138454075096-1.0642912442004755i) +zeta(0.5 + 21i) = (-0.005162203631009034-0.024547030040973836i) +zeta(0.5 + 22i) = (0.7209084385370931+0.6696126306317564i) +zeta(0.5 + 23i) = (1.4457071019171723+0.16082655121997058i) +zeta(0.5 + 24i) = (0.9514044690654355-0.5816075498557441i) +zeta(0.5 + 25i) = (0.004984630580792631-0.01401251916092874i) +zeta(0.5 + 26i) = (0.5005114944585447+1.3355263710661378i) +zeta(0.5 + 27i) = (2.2542569219563466+1.2100942735259386i) +zeta(0.5 + 28i) = (2.72475285551927-0.6825350885746306i) +zeta(0.5 + 29i) = (1.0872669436780653-1.6985665849286409i) +zeta(0.5 + 30i) = (-0.12064238114983518-0.5836914167613544i) +zeta(0.5 + 31i) = (0.5243093914652468+0.3413401438126746i) +zeta(0.5 + 32i) = (0.8441919031410278-0.19669619989166887i) +zeta(0.5 + 33i) = (-0.04536704683948092+0.07919086866397776i) +zeta(0.5 + 34i) = (0.5226421851703524+1.595492801584175i) +zeta(0.5 + 35i) = (2.6003425351468423+1.1077913789481246i) +zeta(0.5 + 36i) = (2.3791375749124963-1.1878311012362968i) +zeta(0.5 + 37i) = (0.2609416367294665-1.1243361230482067i) +zeta(0.5 + 38i) = (0.46425287746764027+0.5918591871654783i) +zeta(0.5 + 39i) = (1.7869510804160964-0.001288967831848416i) +zeta(0.5 + 40i) = (0.7930451660646151-1.0412744730544121i) +zeta(0.5 + 41i) = (0.033222383890028094+0.11518940199566058i) +zeta(0.5 + 42i) = (1.0370889218447463+0.3740077004346159i) +zeta(0.5 + 43i) = (0.43775707509650413-0.30574475309012233i) +zeta(0.5 + 44i) = (0.008808489350630236+1.398489971065758i) +zeta(0.5 + 45i) = (2.713525188708993+1.8000538343834747i) +zeta(0.5 + 46i) = (3.243974723090394-1.387560177262254i) +zeta(0.5 + 47i) = (0.32926978762980097-1.9671961740468524i) +zeta(0.5 + 48i) = (-0.0060578690644484045-0.005369971392070358i) +zeta(0.5 + 49i) = (0.6664184023251712-0.20366266317189488i) +zeta(0.5 + 50i) = (-0.08171241724736424+0.33079218752301587i) +zeta(0.5 + 51i) = (1.2865641195797648+1.2498787178516517i) +zeta(0.5 + 52i) = (1.7393612844371589-0.5018570112340234i) +zeta(0.5 + 53i) = (-0.016355228126186835+0.07034241998375934i) +zeta(0.5 + 54i) = (1.7224272642369127+1.5363220270663704i) +zeta(0.5 + 55i) = (2.6315906314850026-0.9659657369728945i) +zeta(0.5 + 56i) = (0.13974613506346517-1.0709056975554405i) +zeta(0.5 + 57i) = (0.9469792474941187+0.6511883768731029i) +zeta(0.5 + 58i) = (1.539041483649037-0.8499038492156068i) +zeta(0.5 + 59i) = (-0.025991446370375072-0.5265670935227341i) +zeta(0.5 + 60i) = (0.5412011751281808+0.22718371746974492i) +zeta(0.5 + 61i) = (-0.2266989849916014+0.20490032799443425i) +zeta(0.5 + 62i) = (0.8157769042319398+2.5938896243336367i) +zeta(0.5 + 63i) = (4.132881108051588+0.48767777877054236i) +zeta(0.5 + 64i) = (1.4967557305939043-2.544732641992169i) +zeta(0.5 + 65i) = (-0.15842143874973005-0.2160514252843276i) +zeta(0.5 + 66i) = (1.1006717840509341-0.262342881146408i) +zeta(0.5 + 67i) = (0.022061248543629786-0.13921855371668598i) +zeta(0.5 + 68i) = (1.1944549536852997+0.7173571419722004i) +zeta(0.5 + 69i) = (0.8321085422182398-0.637349779832267i) +zeta(0.5 + 70i) = (0.2756550441024011+0.9424585836281872i) +zeta(0.5 + 71i) = (1.976756258230588+0.15328339113125306i) +zeta(0.5 + 72i) = (0.0823523834961891-0.17848490185566393i) +zeta(0.5 + 73i) = (1.9259002897049695+1.906105060981598i) +zeta(0.5 + 74i) = (3.19770932155414-1.542557701913962i) +zeta(0.5 + 75i) = (-0.18684711070701499-1.615865942321532i) +zeta(0.5 + 76i) = (0.4136692500357441+0.0892757224581996i) +zeta(0.5 + 77i) = (0.10175549157442207-0.17222412521276287i) +zeta(0.5 + 78i) = (0.790750703008172+0.8969735244795779i) +zeta(0.5 + 79i) = (0.7029307409907506-0.3091581467500255i) +zeta(0.5 + 80i) = (0.22111866170251857+1.9574218787035467i) +zeta(0.5 + 81i) = (3.901072504769713+0.7224804732190474i) +zeta(0.5 + 82i) = (1.2290406519777917-2.4042454329123197i) +zeta(0.5 + 83i) = (0.16517422176407603+0.15570743048073504i) +zeta(0.5 + 84i) = (0.9983252401449998-0.5951352177194396i) +zeta(0.5 + 85i) = (0.15286135300178122+0.5605918492409111i) +zeta(0.5 + 86i) = (1.9498445904085153-0.0014131814381762426i) +zeta(0.5 + 87i) = (0.21187757523403514-0.7998674475513138i) +zeta(0.5 + 88i) = (0.614747013418097+0.3461798623965869i) +zeta(0.5 + 89i) = (-0.31921588735901557+0.3351157519603476i) +zeta(0.5 + 90i) = (1.8634768540206952+2.926105534775211i) +zeta(0.5 + 91i) = (4.085106413739869-1.3992860916009149i) +zeta(0.5 + 92i) = (-0.16236983334209262-1.6441582733506275i) +zeta(0.5 + 93i) = (1.167990827869101+0.1499671365820265i) +zeta(0.5 + 94i) = (0.35950516590976034-0.9896057634455475i) +zeta(0.5 + 95i) = (0.3435303429143295+0.2172455997920896i) +zeta(0.5 + 96i) = (-0.16619865615534007+0.17000637157271195i) +zeta(0.5 + 97i) = (1.3758493876803801+2.047088536785674i) +zeta(0.5 + 98i) = (2.2777560587903785-0.9414577242256038i) +zeta(0.5 + 99i) = (0.11507303677537545+0.5758632154619121i) +zeta(0.5 + 100i) = (2.692621566568836-0.020388660745440237i) +zeta(0.5 + 101i) = (0.17647627461840876-0.9860979966737974i) +zeta(0.5 + 102i) = (1.6440814332338791+0.6128352418954965i) +zeta(0.5 + 103i) = (0.8059110457071873-1.3704183550580948i) +zeta(0.5 + 104i) = (0.4070175126260989+0.3439125834858781i) +zeta(0.5 + 105i) = (0.5585773256573614-0.4744045343697994i) +zeta(0.5 + 106i) = (0.484982639848052+0.8023094551239781i) +zeta(0.5 + 107i) = (0.4224366102203188-0.1726780948880867i) +zeta(0.5 + 108i) = (0.7200070830779048+2.9802667775273513i) +zeta(0.5 + 109i) = (5.171523782159167-0.4702789349405228i) +zeta(0.5 + 110i) = (0.1564390641901619-3.059413056294919i) +zeta(0.5 + 111i) = (-0.047795083977983974-0.009109460170249457i) +zeta(0.5 + 112i) = (-0.0589352515035653+0.17722407928668438i) +zeta(0.5 + 113i) = (1.5587144438819998+0.7516146855836354i) +zeta(0.5 + 114i) = (0.4286584573952104-0.6641624433377181i) +zeta(0.5 + 115i) = (1.0895536068646312+0.9040099140383571i) +zeta(0.5 + 116i) = (0.47417630024142726-0.4534851223161946i) +zeta(0.5 + 117i) = (1.447747213999014+1.8953308264295312i) +zeta(0.5 + 118i) = (2.2409484309703567-1.360980098082836i) +zeta(0.5 + 119i) = (0.3417820001963893+0.71943703968116i) +zeta(0.5 + 120i) = (2.64575894715204-0.9520897299412524i) +zeta(0.5 + 121i) = (-0.23786891254294099-0.9257232314373743i) +zeta(0.5 + 122i) = (0.861673557903072-0.14058906821592715i) +zeta(0.5 + 123i) = (0.006252549010289455+0.08205959376063243i) +zeta(0.5 + 124i) = (0.47204435664355054+0.002627154762644218i) +zeta(0.5 + 125i) = (-0.1978548537984445+2.3739953674799983i) +zeta(0.5 + 126i) = (4.535875795248366+0.7168081362978612i) +zeta(0.5 + 127i) = (0.488532353872844-2.121289405793879i) +zeta(0.5 + 128i) = (1.4627482485651073+0.4397390865924958i) +zeta(0.5 + 129i) = (0.48076924499858786-1.3016800313673975i) +zeta(0.5 + 130i) = (0.7241467832930968+0.31620245835463007i) +zeta(0.5 + 131i) = (0.08864604248624251-0.17636529828464395i) +zeta(0.5 + 132i) = (1.677065223131396+0.9513019183310915i) +zeta(0.5 + 133i) = (0.6410616086616565-1.0170059789728503i) +zeta(0.5 + 134i) = (0.6684766871465656+0.46237045467559246i) +zeta(0.5 + 135i) = (-0.4749464411422318+0.6325063495421688i) +zeta(0.5 + 136i) = (3.4736886199597503+2.805157512745554i) +zeta(0.5 + 137i) = (2.7558991949980154-3.200473365345837i) +zeta(0.5 + 138i) = (-0.2877992629066284-0.2621674551442467i) +zeta(0.5 + 139i) = (0.7690805660187024-0.8041255026695885i) +zeta(0.5 + 140i) = (0.30357498731966653+0.3026245570034742i) +zeta(0.5 + 141i) = (0.1689234438691938-0.1637447953998141i) +zeta(0.5 + 142i) = (1.1538797519128654+1.2231970618827501i) +zeta(0.5 + 143i) = (0.2956028713200308-0.27328220368451367i) +zeta(0.5 + 144i) = (2.286877568376388+2.506504842270311i) +zeta(0.5 + 145i) = (2.6442398986931286-2.397572757160047i) +zeta(0.5 + 146i) = (-0.002144926227653182-0.002366812018911909i) +zeta(0.5 + 147i) = (0.7062049419983438-0.6456566534382085i) +zeta(0.5 + 148i) = (1.1236216338991276+1.211415460515742i) +zeta(0.5 + 149i) = (1.633565171760917-1.5475768855750451i) +zeta(0.5 + 150i) = (-0.06350412435470304-0.06519267570975998i) +zeta(0.5 + 151i) = (-0.08856501410279728+0.08930048465487257i) +zeta(0.5 + 152i) = (1.415517832411911+1.3472955287638053i) +zeta(0.5 + 153i) = (0.06976662004400147-0.07688837547198053i) +zeta(0.5 + 154i) = (3.2203095478063073+2.7665604747875134i) +zeta(0.5 + 155i) = (2.6982069875960066-3.3407966546168977i) +zeta(0.5 + 156i) = (-0.29859522615857137-0.22502149569460653i) +zeta(0.5 + 157i) = (0.5279695640755835-0.7570014232741825i) +zeta(0.5 + 158i) = (0.4756256360584146+0.30421373058363593i) +zeta(0.5 + 159i) = (-0.17351573927547673+0.298952097399919i) +zeta(0.5 + 160i) = (2.140440885386227+1.1132775442546483i) +zeta(0.5 + 161i) = (0.28053893221868825-0.6113805142221018i) +zeta(0.5 + 162i) = (1.9495490610919428+0.7734430628290887i) +zeta(0.5 + 163i) = (0.03974313759462249-0.11911405687429415i) +zeta(0.5 + 164i) = (3.213405893333728+0.8665813556384605i) +zeta(0.5 + 165i) = (0.39591034515496615-1.9362567650264662i) +zeta(0.5 + 166i) = (1.1786586953723077+0.1624247246578329i) +zeta(0.5 + 167i) = (0.031071386362420284-0.44839764714369895i) +zeta(0.5 + 168i) = (1.3291295722240877-0.0020906804033523187i) +zeta(0.5 + 169i) = (-0.011548339319043381-0.15304892493620068i) +zeta(0.5 + 170i) = (-0.192000924907366+0.02940896808845592i) +zeta(0.5 + 171i) = (0.9587462689870837+4.064891965868779i) +zeta(0.5 + 172i) = (5.491717555861573-1.7845103341574726i) +zeta(0.5 + 173i) = (-0.6869692103665076-1.6264515749976156i) +zeta(0.5 + 174i) = (0.9635199769602854-0.5114540179242324i) +zeta(0.5 + 175i) = (0.31020759146064714+0.4742796722321861i) +zeta(0.5 + 176i) = (0.7798911674673461-0.6220792125505321i) +zeta(0.5 + 177i) = (0.9488054012089596+0.9780343024743638i) +zeta(0.5 + 178i) = (0.6567210052001744-0.7783977971720819i) +zeta(0.5 + 179i) = (1.0991816985298763+0.7491820540778033i) +zeta(0.5 + 180i) = (-0.14258506292391232+0.26546026853707805i) +zeta(0.5 + 181i) = (3.0907822939060994+1.2516491469946451i) +zeta(0.5 + 182i) = (0.27588857780419423-0.9819898006064581i) +zeta(0.5 + 183i) = (3.13418606918818+0.5065871444922444i) +zeta(0.5 + 184i) = (0.1037407398092591-2.36288859263497i) +zeta(0.5 + 185i) = (0.1531798898740049-0.011541853776022471i) +zeta(0.5 + 186i) = (0.11470387530165622+0.5746942904318185i) +zeta(0.5 + 187i) = (0.536031735357447-0.17851967576333003i) +zeta(0.5 + 188i) = (1.0242009285179152+2.1276526007476195i) +zeta(0.5 + 189i) = (1.554689923811664-1.015143048840023i) +zeta(0.5 + 190i) = (1.8360952365945133+2.132236337142635i) +zeta(0.5 + 191i) = (2.3878904631542603-2.696375627369743i) +zeta(0.5 + 192i) = (-0.0627790851764168-0.041770894205093966i) +zeta(0.5 + 193i) = (0.07861722694025475-0.16409541152285523i) +zeta(0.5 + 194i) = (1.9848556010060268+0.6224259193818323i) +zeta(0.5 + 195i) = (0.12279575877749199-0.7687652926776012i) +zeta(0.5 + 196i) = (1.2621381272699754+0.013063070133402856i) +zeta(0.5 + 197i) = (0.0363349036404105+0.2573767422025508i) +zeta(0.5 + 198i) = (0.04564930812920507-0.013790931470128966i) +zeta(0.5 + 199i) = (1.9587679481815776+4.064937374554911i) +zeta(0.5 + 200i) = (4.590573499544427-3.1893985062721724i) +zeta(0.5 + 201i) = (-0.7410155853734863-0.7674471767578077i) +zeta(0.5 + 202i) = (0.5181863338483781-0.6963271500020374i) +zeta(0.5 + 203i) = (0.8804310328070261+0.45180786758622626i) +zeta(0.5 + 204i) = (0.1197087362414176-0.37888518241068897i) +zeta(0.5 + 205i) = (0.7367938737209063+0.10043481760605569i) +zeta(0.5 + 206i) = (0.07953462359048227+2.119467096538721i) +zeta(0.5 + 207i) = (3.395887414535241-0.7341920855861073i) +zeta(0.5 + 208i) = (0.15742226408895815+0.38213929205687974i) +zeta(0.5 + 209i) = (1.5941830277037146-1.024044278746046i) +zeta(0.5 + 210i) = (1.1384846981216306+1.213258561940317i) +zeta(0.5 + 211i) = (1.3236399984626899-1.8071272106714833i) +zeta(0.5 + 212i) = (0.7953837741166344+0.3791268760077811i) +zeta(0.5 + 213i) = (0.18936243375099776-0.7262383223685358i) +zeta(0.5 + 214i) = (0.7254560404515003+0.0457521332842105i) +zeta(0.5 + 215i) = (0.1384014411800662+1.0469297736472754i) +zeta(0.5 + 216i) = (0.6377472006257026-0.21715181586409446i) +zeta(0.5 + 217i) = (2.144398519295946+3.6831558675423266i) +zeta(0.5 + 218i) = (3.787931053755155-3.380386444233907i) +zeta(0.5 + 219i) = (-0.23281234165806855-0.17281159606102492i) +zeta(0.5 + 220i) = (0.5307441244593835-1.1493820117560687i) +zeta(0.5 + 221i) = (0.2671887895692381+0.060978348254495225i) +zeta(0.5 + 222i) = (-0.019390721566650813+1.394464155923773i) +zeta(0.5 + 223i) = (2.640574121609091-0.5320330850109696i) +zeta(0.5 + 224i) = (-0.007488495830591868-0.017048351090451025i) +zeta(0.5 + 225i) = (-0.03940967761114105+0.028792563766852464i) +zeta(0.5 + 226i) = (2.6894686205362217+2.3606443777768673i) +zeta(0.5 + 227i) = (1.0233590165538673-1.8788767287686703i) +zeta(0.5 + 228i) = (2.257499778098693+0.6367099706337402i) +zeta(0.5 + 229i) = (0.06259388413475861-1.2798725406990652i) +zeta(0.5 + 230i) = (1.637508261142043-0.2968740915582306i) +zeta(0.5 + 231i) = (-0.1804134546690774-0.41539745063367045i) +zeta(0.5 + 232i) = (-0.015196758792151372+0.01136990185706092i) +zeta(0.5 + 233i) = (1.1916305795179674+0.9911233484381525i) +zeta(0.5 + 234i) = (-0.6637213620135244+1.3500087110916745i) +zeta(0.5 + 235i) = (5.371229328723405+1.1895479774061306i) +zeta(0.5 + 236i) = (-0.060036014015389404-2.5905235413382197i) +zeta(0.5 + 237i) = (1.1231366946904933-0.30649794759032073i) +zeta(0.5 + 238i) = (0.3317836185895716+0.590712677145955i) +zeta(0.5 + 239i) = (1.0464736422800698-0.9930464473213358i) +zeta(0.5 + 240i) = (0.9014715461343615+0.5677519685906258i) +zeta(0.5 + 241i) = (0.043445678296538774-0.13543506306137076i) +zeta(0.5 + 242i) = (1.762839513396535+0.10010063746975703i) +zeta(0.5 + 243i) = (0.10082040990696625+0.4998107216741868i) +zeta(0.5 + 244i) = (0.2536361716871198-0.12467274550539542i) +zeta(0.5 + 245i) = (3.188013953645374+3.658861056825868i) +zeta(0.5 + 246i) = (2.8715345768407814-4.268861978131288i) +zeta(0.5 + 247i) = (-0.4160256771677698-0.1416645759537978i) +zeta(0.5 + 248i) = (0.011401154218836142-0.18294490288499063i) +zeta(0.5 + 249i) = (0.9237437602774011-0.19279085193591883i) +zeta(0.5 + 250i) = (0.4207358202414482+0.8166192532820277i) +zeta(0.5 + 251i) = (0.03766559047690358-0.034931461591214116i) +zeta(0.5 + 252i) = (2.6457153895444185+1.6187132511694893i) +zeta(0.5 + 253i) = (0.10287961729598563-0.3673167560848418i) +zeta(0.5 + 254i) = (3.6445576515846434-0.017670321112282335i) +zeta(0.5 + 255i) = (-0.3295829129194698-1.125926098171601i) +zeta(0.5 + 256i) = (0.6975724210307064-0.4438235366236223i) +zeta(0.5 + 257i) = (1.475817934971329+1.295249888872586i) +zeta(0.5 + 258i) = (0.7716951809120368-1.6626175346768564i) +zeta(0.5 + 259i) = (0.7248503013481787+0.10720905500950183i) +zeta(0.5 + 260i) = (0.029873378118891587+0.2077591684746406i) +zeta(0.5 + 261i) = (-0.5731370464533995+0.265890680151719i) +zeta(0.5 + 262i) = (3.3716378060009395+3.7838934317732535i) +zeta(0.5 + 263i) = (1.856243531069992-3.0442528048934197i) +zeta(0.5 + 264i) = (2.0448594490029275+0.5227194453444345i) +zeta(0.5 + 265i) = (-0.08628012301769612-1.7623664275538804i) +zeta(0.5 + 266i) = (0.6016404733336643-0.21960767268276452i) +zeta(0.5 + 267i) = (0.41092535081490206+0.5372599676870611i) +zeta(0.5 + 268i) = (-0.13271969370788536+0.18867112760386762i) +zeta(0.5 + 269i) = (2.4992229393669647+0.7904948251038936i) +zeta(0.5 + 270i) = (0.00026843344493007715+0.12222516685537776i) +zeta(0.5 + 271i) = (1.6446371148816517-0.5315638366246739i) +zeta(0.5 + 272i) = (1.3160093055367192+1.8245878719379351i) +zeta(0.5 + 273i) = (1.2981507076593428-1.7735271071670626i) +zeta(0.5 + 274i) = (2.217666338226916+0.7249344617580298i) +zeta(0.5 + 275i) = (-0.0031724184912690426-1.7638312174820163i) +zeta(0.5 + 276i) = (0.4505934668331324-0.1500019203887131i) +zeta(0.5 + 277i) = (0.6719939249549965+0.8974356395504991i) +zeta(0.5 + 278i) = (0.35209702965337925-0.5092887999668293i) +zeta(0.5 + 279i) = (0.5656938380558018+0.16262047333062823i) +zeta(0.5 + 280i) = (0.19340174756554657+4.1254885398629915i) +zeta(0.5 + 281i) = (6.347023926031997-2.5012548870087987i) +zeta(0.5 + 282i) = (-1.2664003725107134-1.4861683562903714i) +zeta(0.5 + 283i) = (0.17210739990024318-0.29174830578267963i) +zeta(0.5 + 284i) = (1.3819499623069074+0.2788341575024795i) +zeta(0.5 + 285i) = (0.07223902116611397+0.5257937654742578i) +zeta(0.5 + 286i) = (1.5827983492486948-0.8118333323533602i) +zeta(0.5 + 287i) = (0.5993135729488479+0.5670480285432473i) +zeta(0.5 + 288i) = (-0.11624798359038772+0.26251319413090496i) +zeta(0.5 + 289i) = (2.0810954633903895+0.15480633681937306i) +zeta(0.5 + 290i) = (0.6189648096093197+2.235724210990849i) +zeta(0.5 + 291i) = (3.315628102366755-2.347876228880343i) +zeta(0.5 + 292i) = (0.6036317674480327+0.41907113058272244i) +zeta(0.5 + 293i) = (0.40794888085732645-1.5500000132926532i) +zeta(0.5 + 294i) = (0.8200150636806042-0.07718356082969001i) +zeta(0.5 + 295i) = (0.01795921553104662+0.037486401340659246i) +zeta(0.5 + 296i) = (-0.7697804943107117+0.7947381469217291i) +zeta(0.5 + 297i) = (3.3957077021820514+1.4886492803939047i) +zeta(0.5 + 298i) = (-0.006695106506553714+0.1212735503923075i) +zeta(0.5 + 299i) = (3.1108346974148935-0.9775246413820083i) +zeta(0.5 + 300i) = (0.4774607789211952+0.6079001306815907i) +zeta(0.5 + 301i) = (1.0369175064063036-1.7219276092008455i) +zeta(0.5 + 302i) = (0.7247375563609836+0.12991391290225762i) +zeta(0.5 + 303i) = (0.17891102859530775+0.9356587521519959i) +zeta(0.5 + 304i) = (1.9045678292292993-1.185822717408511i) +zeta(0.5 + 305i) = (0.21374107374649695+0.16057753389401994i) +zeta(0.5 + 306i) = (-0.17737513752361428+0.6333343808838148i) +zeta(0.5 + 307i) = (0.9327283246235818-0.09339737597353807i) +zeta(0.5 + 308i) = (2.202959901458743+4.290979070349089i) +zeta(0.5 + 309i) = (3.879982933652073-4.420553751737769i) +zeta(0.5 + 310i) = (-0.4099117855272392-0.14620767263201945i) +zeta(0.5 + 311i) = (-0.012637416054312959-0.3438305822660514i) +zeta(0.5 + 312i) = (0.7150726343120581-0.31736078938912327i) +zeta(0.5 + 313i) = (0.9079317084022119+0.8813271460990734i) +zeta(0.5 + 314i) = (-0.018344561511165324+0.04508798724178415i) +zeta(0.5 + 315i) = (1.6331745709670407+0.0009908977794168146i) +zeta(0.5 + 316i) = (1.0011174291157325+2.4582708227973606i) +zeta(0.5 + 317i) = (2.4207586374241234-2.374091316473862i) +zeta(0.5 + 318i) = (0.8354424793309669+0.35779154162843263i) +zeta(0.5 + 319i) = (-0.0077701218651994265+0.6186333631107325i) +zeta(0.5 + 320i) = (3.1428693417334324-1.259275517036943i) +zeta(0.5 + 321i) = (-0.3374553955235978-0.3436560822241608i) +zeta(0.5 + 322i) = (0.10259020396023265-0.24419021035974658i) +zeta(0.5 + 323i) = (0.883137809285956-0.0005131607257043899i) +zeta(0.5 + 324i) = (0.5212122322327936+1.231255562663039i) +zeta(0.5 + 325i) = (-0.5089699260107742+0.5260008962164506i) +zeta(0.5 + 326i) = (5.477653180018219+2.0994020661808452i) +zeta(0.5 + 327i) = (-0.1064914350664978-2.7660801092133114i) +zeta(0.5 + 328i) = (1.6745738232119285-0.7975623050540501i) +zeta(0.5 + 329i) = (-0.05834094645306286-0.05104580568905442i) +zeta(0.5 + 330i) = (-0.03055183962906374+0.09547190560138183i) +zeta(0.5 + 331i) = (1.2589990970354612-0.1273982627360343i) +zeta(0.5 + 332i) = (0.9669370188936168+1.716842363085928i) +zeta(0.5 + 333i) = (1.1930931481915874-1.5881863407141004i) +zeta(0.5 + 334i) = (0.2959824433914999+0.0690552772251458i) +zeta(0.5 + 335i) = (0.6428616379286229+3.3904597447619573i) +zeta(0.5 + 336i) = (3.816811092415191-2.6419196614930165i) +zeta(0.5 + 337i) = (0.6802676299073575+0.41312703481715635i) +zeta(0.5 + 338i) = (0.14601988438275007-1.1646248201313614i) +zeta(0.5 + 339i) = (1.349558122711173-0.41421554108984737i) +zeta(0.5 + 340i) = (0.20315567817236896+0.23079028558372475i) +zeta(0.5 + 341i) = (0.03427891994734452-0.07603623307380558i) +zeta(0.5 + 342i) = (0.17164061366193376-0.0005837473241346461i) +zeta(0.5 + 343i) = (1.9753964450489254+4.286680597996737i) +zeta(0.5 + 344i) = (2.786023079345684-3.247107277389595i) +zeta(0.5 + 345i) = (1.657033522927106+0.4725626382306894i) +zeta(0.5 + 346i) = (-0.17794578981015868-1.1391976357935403i) +zeta(0.5 + 347i) = (0.4802937091331465-0.32099524687253794i) +zeta(0.5 + 348i) = (1.8374691231140745+1.1164520268893434i) +zeta(0.5 + 349i) = (0.1120408741705797-1.0247136204349716i) +zeta(0.5 + 350i) = (0.7528263791696114-0.2575325306698171i) +zeta(0.5 + 351i) = (0.9817738322187545+1.0133895948494243i) +zeta(0.5 + 352i) = (-0.17615045189224535+0.46815657023433493i) +zeta(0.5 + 353i) = (2.2857378578693863-0.18996433524697123i) +zeta(0.5 + 354i) = (1.719340820518518+2.9538918661175955i) +zeta(0.5 + 355i) = (2.7789900783811246-4.079061665786671i) +zeta(0.5 + 356i) = (-0.06052146918859452-0.009207522011198132i) +zeta(0.5 + 357i) = (-0.07286834555482906-0.23773848244185886i) +zeta(0.5 + 358i) = (-0.06672524540071167+0.06181717967801029i) +zeta(0.5 + 359i) = (1.7694332564521398+0.691041384124883i) +zeta(0.5 + 360i) = (0.08337795317922936+1.0362039728533547i) +Single-threaded time: 1m17.69139285s +zeta(0.5 + 0i) = (-1.460354490825986-0i) +zeta(0.5 + 1i) = (0.14393641589399253-0.7220997580757096i) +zeta(0.5 + 2i) = (0.4405456698102864-0.31164633737082426i) +zeta(0.5 + 3i) = (0.5327366607938497-0.07889649431112843i) +zeta(0.5 + 4i) = (0.6067837478346684+0.09111212096636631i) +zeta(0.5 + 5i) = (0.7018124002849306+0.23103799662077493i) +zeta(0.5 + 6i) = (0.8372238101252781+0.34021843923996353i) +zeta(0.5 + 7i) = (1.0214341698511638+0.39618947774813856i) +zeta(0.5 + 8i) = (1.2416151953018482+0.36004750083582565i) +zeta(0.5 + 9i) = (1.4476422953575663+0.1918032936134306i) +zeta(0.5 + 10i) = (1.5448952913264118-0.11533662276858274i) +zeta(0.5 + 11i) = (1.4196502155122728-0.4876752677536645i) +zeta(0.5 + 12i) = (1.0159365670989555-0.7451124492046644i) +zeta(0.5 + 13i) = (0.443004787051599-0.6554831801741506i) +zeta(0.5 + 14i) = (0.022241223977371216-0.10325809170717094i) +zeta(0.5 + 15i) = (0.1471098406055885+0.7047523220826278i) +zeta(0.5 + 16i) = (0.9385453354787251+1.2165876915656293i) +zeta(0.5 + 17i) = (1.9466550870884283+0.8954051743100186i) +zeta(0.5 + 18i) = (2.3291543128015366-0.18886572384235986i) +zeta(0.5 + 19i) = (1.6224961022661955-1.1601176464534653i) +zeta(0.5 + 20i) = (0.42991384589573334-1.0642912442008063i) +zeta(0.5 + 21i) = (-0.005162203772883022-0.02454702967256128i) +zeta(0.5 + 22i) = (0.7209084382489135+0.6696126303916962i) +zeta(0.5 + 23i) = (1.44570710225778+0.16082655100624665i) +zeta(0.5 + 24i) = (0.9514044691804247-0.5816075493851838i) +zeta(0.5 + 25i) = (0.004984629911142356-0.014012519233701264i) +zeta(0.5 + 26i) = (0.5005114950832158+1.3355263700630742i) +zeta(0.5 + 27i) = (2.2542569217624244+1.2100942765106906i) +zeta(0.5 + 28i) = (2.7247528558023406-0.6825350903941603i) +zeta(0.5 + 29i) = (1.0872669444740652-1.6985665842380722i) +zeta(0.5 + 30i) = (-0.12064238187161759-0.5836914163804792i) +zeta(0.5 + 31i) = (0.5243093913466057+0.34134014307441396i) +zeta(0.5 + 32i) = (0.84419190390745-0.19669619977207567i) +zeta(0.5 + 33i) = (-0.045367047251909445+0.07919086946994947i) +zeta(0.5 + 34i) = (0.5226421843361436+1.5954928006966362i) +zeta(0.5 + 35i) = (2.6003425370946958+1.1077913783043256i) +zeta(0.5 + 36i) = (2.379137571769956-1.1878310972644752i) +zeta(0.5 + 37i) = (0.26094163923252606-1.124336125351843i) +zeta(0.5 + 38i) = (0.4642528777571636+0.5918591890045498i) +zeta(0.5 + 39i) = (1.7869510790502148-0.0012889681356392086i) +zeta(0.5 + 40i) = (0.7930451667142129-1.0412744741242488i) +zeta(0.5 + 41i) = (0.03322238471962838+0.11518940295788167i) +zeta(0.5 + 42i) = (1.037088920505002+0.37400770099289565i) +zeta(0.5 + 43i) = (0.4377570749919415-0.3057447549945518i) +zeta(0.5 + 44i) = (0.008808492254361883+1.398489972188309i) +zeta(0.5 + 45i) = (2.713525181545026+1.8000538365496281i) +zeta(0.5 + 46i) = (3.243974728647642-1.3875601777249582i) +zeta(0.5 + 47i) = (0.32926978612841634-1.967196171524886i) +zeta(0.5 + 48i) = (-0.006057870373165694-0.0053699731010506i) +zeta(0.5 + 49i) = (0.666418404115664-0.20366266377610776i) +zeta(0.5 + 50i) = (-0.08171241722481384+0.3307921894093681i) +zeta(0.5 + 51i) = (1.286564117557064+1.2498787172177848i) +zeta(0.5 + 52i) = (1.7393612860713594-0.5018570134253444i) +zeta(0.5 + 53i) = (-0.016355225980555495+0.07034242376270645i) +zeta(0.5 + 54i) = (1.7224272546094985+1.5363220238631528i) +zeta(0.5 + 55i) = (2.6315906386237438-0.9659657324105579i) +zeta(0.5 + 56i) = (0.13974613101617395-1.0709056961024415i) +zeta(0.5 + 57i) = (0.9469792476227125+0.6511883737906418i) +zeta(0.5 + 58i) = (1.5390414861329518-0.8499038482484681i) +zeta(0.5 + 59i) = (-0.02599144803049402-0.5265670914904433i) +zeta(0.5 + 60i) = (0.5412011735565+0.22718371502331589i) +zeta(0.5 + 61i) = (-0.2266989814041986+0.20490032712992312i) +zeta(0.5 + 62i) = (0.8157769032730543+2.593889629983945i) +zeta(0.5 + 63i) = (4.132881100443742+0.4876777682653809i) +zeta(0.5 + 64i) = (1.4967557348833707-2.544732630560245i) +zeta(0.5 + 65i) = (-0.15842144439129255-0.21605142729108104i) +zeta(0.5 + 66i) = (1.1006717868721718-0.26234288426793545i) +zeta(0.5 + 67i) = (0.022061250275623674-0.13921855057989727i) +zeta(0.5 + 68i) = (1.194454950264096+0.7173571426321643i) +zeta(0.5 + 69i) = (0.8321085426883215-0.6373497836168928i) +zeta(0.5 + 70i) = (0.27565504838607346+0.9424585857284131i) +zeta(0.5 + 71i) = (1.9767562527691427+0.15328339590678167i) +zeta(0.5 + 72i) = (0.08235238355745175-0.17848491775503314i) +zeta(0.5 + 73i) = (1.925900285104064+1.9061050772671835i) +zeta(0.5 + 74i) = (3.197709317391363-1.5425577087844387i) +zeta(0.5 + 75i) = (-0.18684710523303746-1.6158659431154971i) +zeta(0.5 + 76i) = (0.41366924916111+0.08927572702230276i) +zeta(0.5 + 77i) = (0.10175548766134654-0.17222412736920997i) +zeta(0.5 + 78i) = (0.7907507065348346+0.8969735211707436i) +zeta(0.5 + 79i) = (0.7029307434436279-0.3091581413064722i) +zeta(0.5 + 80i) = (0.22111865280317375+1.957421879008417i) +zeta(0.5 + 81i) = (3.901072516078567+0.7224804580835682i) +zeta(0.5 + 82i) = (1.2290406341603404-2.4042454187768483i) +zeta(0.5 + 83i) = (0.1651742232023972+0.15570742010291674i) +zeta(0.5 + 84i) = (0.9983252461835719-0.5951352140437265i) +zeta(0.5 + 85i) = (0.1528613484745274+0.5605918529655747i) +zeta(0.5 + 86i) = (1.9498445883732327-0.0014131866301556452i) +zeta(0.5 + 87i) = (0.21187758119626476-0.7998674479123836i) +zeta(0.5 + 88i) = (0.6147470114904582+0.3461798694221327i) +zeta(0.5 + 89i) = (-0.3192158958515593+0.3351157455011642i) +zeta(0.5 + 90i) = (1.8634768750649553+2.926105528613048i) +zeta(0.5 + 91i) = (4.085106384001059-1.3992860899286141i) +zeta(0.5 + 92i) = (-0.1623698235832847-1.6441582824848295i) +zeta(0.5 + 93i) = (1.1679908307656535+0.14996714492994367i) +zeta(0.5 + 94i) = (0.3595051586748201-0.9896057634741804i) +zeta(0.5 + 95i) = (0.3435303450533723+0.21724559332433846i) +zeta(0.5 + 96i) = (-0.16619865032660747+0.17000637584155548i) +zeta(0.5 + 97i) = (1.3758493805514793+2.0470885417910436i) +zeta(0.5 + 98i) = (2.277756055860657-0.9414577364205228i) +zeta(0.5 + 99i) = (0.11507306011569333+0.5758632243811442i) +zeta(0.5 + 100i) = (2.6926215340265878-0.020388680580568582i) +zeta(0.5 + 101i) = (0.17647629133049786-0.9860979979017737i) +zeta(0.5 + 102i) = (1.6440814294596418+0.6128352520658042i) +zeta(0.5 + 103i) = (0.8059110389756162-1.3704183606808005i) +zeta(0.5 + 104i) = (0.4070175195594192+0.34391257915072204i) +zeta(0.5 + 105i) = (0.5585773277524019-0.4744045260389149i) +zeta(0.5 + 106i) = (0.48498262963581273+0.8023094543203616i) +zeta(0.5 + 107i) = (0.4224366165250743-0.17267810796081676i) +zeta(0.5 + 108i) = (0.72000709776936+2.980266801434106i) +zeta(0.5 + 109i) = (5.17152376224011-0.4702789782608925i) +zeta(0.5 + 110i) = (0.15643908123967668-3.0594130445338217i) +zeta(0.5 + 111i) = (-0.04779509532229257-0.009109453573111307i) +zeta(0.5 + 112i) = (-0.05893525341415019+0.17722406898509815i) +zeta(0.5 + 113i) = (1.558714453469524+0.7516146868713441i) +zeta(0.5 + 114i) = (0.4286584530543442-0.6641624342517831i) +zeta(0.5 + 115i) = (1.0895535983269555+0.9040099057744185i) +zeta(0.5 + 116i) = (0.47417631527010484-0.453485129316426i) +zeta(0.5 + 117i) = (1.4477472106443432+1.8953308573924788i) +zeta(0.5 + 118i) = (2.240948439734763-1.3609801557263097i) +zeta(0.5 + 119i) = (0.34178200747315807+0.7194370639201899i) +zeta(0.5 + 120i) = (2.6457589316742043-0.952089732461397i) +zeta(0.5 + 121i) = (-0.23786890653171402-0.9257232422392313i) +zeta(0.5 + 122i) = (0.8616735655693998-0.14058905990752893i) +zeta(0.5 + 123i) = (0.006252538424597679+0.0820595986566885i) +zeta(0.5 + 124i) = (0.4720443551321597+0.002627141223374175i) +zeta(0.5 + 125i) = (-0.19785483564763365+2.3739953721140976i) +zeta(0.5 + 126i) = (4.53587577140217+0.7168081608640761i) +zeta(0.5 + 127i) = (0.4885323999797055-2.1212894579522374i) +zeta(0.5 + 128i) = (1.4627482371601588+0.43973911502026425i) +zeta(0.5 + 129i) = (0.4807692327441679-1.3016800452887354i) +zeta(0.5 + 130i) = (0.7241467967387482+0.31620245310753375i) +zeta(0.5 + 131i) = (0.08864604318368736-0.1763652852287655i) +zeta(0.5 + 132i) = (1.6770652102044497+0.9513019149124874i) +zeta(0.5 + 133i) = (0.6410616171285779-1.0170059919152428i) +zeta(0.5 + 134i) = (0.6684766995795213+0.4623704715643141i) +zeta(0.5 + 135i) = (-0.4749464781418683+0.6325063545494717i) +zeta(0.5 + 136i) = (3.4736886978819843+2.8051574903516943i) +zeta(0.5 + 137i) = (2.7558991630487877-3.2004733471195856i) +zeta(0.5 + 138i) = (-0.2877992636623664-0.2621674768745397i) +zeta(0.5 + 139i) = (0.7690805818792081-0.804125497438633i) +zeta(0.5 + 140i) = (0.30357497839027137+0.30262456903882684i) +zeta(0.5 + 141i) = (0.168923435032592-0.1637448077615042i) +zeta(0.5 + 142i) = (1.1538797685387088+1.2231970567218131i) +zeta(0.5 + 143i) = (0.29560287010983655-0.2732821804246431i) +zeta(0.5 + 144i) = (2.2868775335604385+2.5065048216851866i) +zeta(0.5 + 145i) = (2.6442399870607103-2.397572731253821i) +zeta(0.5 + 146i) = (-0.0021449696204917153-0.002366818566700437i) +zeta(0.5 + 147i) = (0.7062049573447258-0.64565 +``` diff --git a/v3.0/go.mod b/v3.0/go.mod new file mode 100644 index 0000000..283e20f --- /dev/null +++ b/v3.0/go.mod @@ -0,0 +1,3 @@ +module riemannzeta + +go 1.19 diff --git a/v3.0/riemannzeta b/v3.0/riemannzeta new file mode 100644 index 0000000..3e3347f Binary files /dev/null and b/v3.0/riemannzeta differ diff --git a/v3.0/riemannzeta.go b/v3.0/riemannzeta.go new file mode 100644 index 0000000..0f6bee9 --- /dev/null +++ b/v3.0/riemannzeta.go @@ -0,0 +1,102 @@ +package main + +import ( + "fmt" + "math/cmplx" + "time" +) + +const TERMS uint = 65536 + +func zeta(s complex128) complex128 { + var denom complex128 = complex(1, 0) - cmplx.Pow(complex(2, 0), (complex(1, 0)-s)) + return eta(s) / denom +} + +func zeta_multithreaded(s complex128, threads uint8) complex128 { + var denom complex128 = complex(1, 0) - cmplx.Pow(complex(2, 0), (complex(1, 0)-s)) + return eta_multithreaded(s, threads) / denom +} + +func eta(s complex128) complex128 { + if real(s) == 1 && imag(s) == 1 { + return cmplx.Inf() + } + var sum complex128 = complex(0, 0) + for k := uint(1); k <= TERMS; k++ { + sum += etaterm(s, k) + } + return sum + etaterm(s, TERMS+1)/2 +} + +func eta_multithreaded(s complex128, threads uint8) complex128 { + c := make(chan complex128) + var subterms uint = (uint(threads) + TERMS - 1) / uint(threads) + var totalterms uint = subterms * uint(threads) + var ini uint = 0 + for t := uint8(0); t < threads; t++ { + go eta_slice(ini+1, ini+subterms, s, c) + ini += subterms + } + var sum complex128 = complex(0, 0) + for t := uint8(0); t < threads; t++ { + sum += <-c + } + + return sum + etaterm(s, totalterms+1)/2 +} + +func eta_slice(ini uint, fin uint, s complex128, c chan complex128) { + var sum complex128 = complex(0, 0) + for k := ini; k <= fin; k++ { + sum += etaterm(s, k) + } + c <- sum +} + +func etaterm(s complex128, k uint) complex128 { + var sgn int = 1 + if k&1 == 0 { + sgn = -1 + } + var ans complex128 = complex(float64(sgn), 0) * cmplx.Pow(complex(float64(k), 0), -s) + return ans +} + +func main() { + /* Hello World */ + fmt.Println("Hello, World!") + /* Input imaginary number */ + var a, b float64 + fmt.Println("Enter real component: ") + fmt.Scanf("%g", &a) + fmt.Println("Enter imag component: ") + fmt.Scanf("%g", &b) + var z complex128 = complex(a, b) + fmt.Printf("z = %g\n", z) + /* Obtain zeta function */ + const THREADS = 12 + fmt.Printf("zeta(z) = %g\n", zeta(z)) + fmt.Printf("zeta(z) = %g\n", zeta_multithreaded(z, THREADS)) + /* Time loop for the first 360 zeta */ + const INTERVAL uint = 60 + const TOPHEIGHT = 360 + var t1 = time.Now() + for j := uint(0); j <= INTERVAL*TOPHEIGHT; j++ { + var height float64 = float64(j/INTERVAL) + float64(j%INTERVAL)/float64(INTERVAL) + zs := zeta(complex(0.5, height)) + if j%INTERVAL == 0 { + fmt.Printf("zeta(0.5 + %gi) = %g\n", height, zs) + } + } + fmt.Printf("Single-threaded time: %s\n", time.Since(t1)) + t1 = time.Now() + for j := uint(0); j <= INTERVAL*TOPHEIGHT; j++ { + var height float64 = float64(j/INTERVAL) + float64(j%INTERVAL)/float64(INTERVAL) + zs := zeta_multithreaded(complex(0.5, height), THREADS) + if j%INTERVAL == 0 { + fmt.Printf("zeta(0.5 + %gi) = %g\n", height, zs) + } + } + fmt.Printf("Single-threaded time: %s\n", time.Since(t1)) +}