JAVA代码到VBA
我有这个Java代码,我想把它转换成VBA。有人能帮我吗?
public static double getCoord1(double x1, double x2) {
System.out.println("x1" + x1);
System.out.println("x2" + x2);
return (19.358580801100622D + 1.58217721758051D * (((((((((((((-4.2655999519541243D + 8.0959581995092766E-006 / (1.0D + Math.pow(2.7182818284590451D, (-5.6804423921037124D + 4.0148150603502211E-006D * (-672997.08715902898D + x1)) - 7.2235728410131937E-005D * (-201336.0152722373D + x2)))) - 4.1806523894206463E-006D / (1.0D + Math.pow(2.7182818284590451D, (2.0059344524844533D + 7.1298061075003664E-005D * (-672997.08715902898D + x1)) - 5.7327558460853423E-005D * (-201336.0152722373D + x2)))) + 0.0016404146419169159D / (1.0D + Math.pow(2.7182818284590451D, (5.3638108372930038D + 1.0129847357970255E-005D * (-672997.08715902898D + x1)) - 4.9051367548513789E-005D * (-201336.0152722373D + x2)))) - 5.2008995858358655E-005D / (1.0D + Math.pow(2.7182818284590451D, (-2.2174100651688957D + 1.398139016485919E-005D * (-672997.08715902898D + x1)) - 3.3973347354028815E-005D * (-201336.0152722373D + x2)))) + 8.837269676673746E-005D / (1.0D + Math.pow(2.7182818284590451D, (3.3797868221671012D + 2.8426261561132554E-005D * (-672997.08715902898D + x1)) - 2.4708945537318931E-005D * (-201336.0152722373D + x2))) + 0.0019012943571414889D / (1.0D + Math.pow(2.7182818284590451D, -5.4314960622774944D - 2.6901156783704673E-005D * (-672997.08715902898D + x1) - 1.7148041736945787E-005D * (-201336.0152722373D + x2)))) - 0.00013167379053669577D / (1.0D + Math.pow(2.7182818284590451D, 2.07425372229156D - 2.2015134083724753E-005D * (-672997.08715902898D + x1) - 7.6752585540424171E-006D * (-201336.0152722373D + x2)))) + 3.483645775824239E-006D / (1.0D + Math.pow(2.7182818284590451D, 0.71077168931088164D - 7.8028221837133643E-005D * (-672997.08715902898D + x1) - 4.9628211684585428E-006D * (-201336.0152722373D + x2)))) - 0.0014027812664886793D / (1.0D + Math.pow(2.7182818284590451D, -2.1024950195082108D - 1.7733582929873295E-005D * (-672997.08715902898D + x1) - 4.3413925673664666E-006D * (-201336.0152722373D + x2))) - 7834.8589895490104D / (1.0D + Math.pow(2.7182818284590451D, 2.2073005120480844D - 1.8923820935247924E-006D * (-672997.08715902898D + x1) - 2.1306950258608695E-006D * (-201336.0152722373D + x2)))) + 7834.7561928822743D / (1.0D + Math.pow(2.7182818284590451D, 2.2085782036664177D - 1.8957580947580068E-006D * (-672997.08715902898D + x1) - 2.1305379165776499E-006D * (-201336.0152722373D + x2))) + 4.0083203718690834D / (1.0D + Math.pow(2.7182818284590451D, 0.60643227240570874D - 3.8308973833930152E-006D * (-672997.08715902898D + x1) - 1.8201497934477872E-006D * (-201336.0152722373D + x2))) + 4.5806877814283284D / (1.0D + Math.pow(2.7182818284590451D, -1.1717331851056438D - 4.2225325198563229E-006D * (-672997.08715902898D + x1) - 1.2374471314504404E-006D * (-201336.0152722373D + x2)))) - 0.001513866629536354D / (1.0D + Math.pow(2.7182818284590451D, (-0.13771191906946204D - 1.5252828275866858E-005D * (-672997.08715902898D + x1)) + 3.9904792883560988E-007D * (-201336.0152722373D + x2))) - 2.2523589570865972D / (1.0D + Math.pow(2.7182818284590451D, 3.8739746064657159D + 6.65046935867269E-006D * (-672997.08715902898D + x1) + 8.5808071431386839E-007D * (-201336.0152722373D + x2))) - 0.0026357645497366309D / (1.0D + Math.pow(2.7182818284590451D, -4.5930699198972595D + 1.7103309390171037E-005D * (-672997.08715902898D + x1) + 4.6183904823745204E-006D * (-201336.0152722373D + x2)))) + 0.88749097678295785D / (1.0D + Math.pow(2.7182818284590451D, (0.70003560362359907D - 2.2625689696651706E-007D * (-672997.08715902898D + x1)) + 5.0911945633820529E-006D * (-201336.0152722373D + x2))) + 0.0049356035513091617D / (1.0D + Math.pow(2.7182818284590451D, (-0.64259307805359678D - 8.7495989852671568E-006D * (-672997.08715902898D + x1)) + 1.0773226784863697E-005D * (-201336.0152722373D + x2))) + 0.002859786120419025D / (1.0D + Math.pow(2.7182818284590451D, 5.0874396912451418D + 2.4937490622539254E-005D * (-672997.08715902898D + x1) + 1.5417155811501537E-005D * (-201336.0152722373D + x2))) + 0.025109573293481884D / (1.0D + Math.pow(2.7182818284590451D, (2.8691800892681707D - 2.2958779534221289E-006D * (-672997.08715902898D + x1)) + 1.85651747614609E-005D * (-201336.0152722373D + x2))) + 0.00074690548795095803D / (1.0D + Math.pow(2.7182818284590451D, (2.9763796416517856D - 2.9128678452443209E-005D * (-672997.08715902898D + x1)) + 2.7208614018570741E-005D * (-201336.0152722373D + x2))) + 0.00021122842889656645D / (1.0D + Math.pow(2.7182818284590451D, (6.0469238078240535D - 3.3298625573293395E-005D * (-672997.08715902898D + x1)) + 2.9280442229884525E-005D * (-201336.0152722373D + x2)))) - 1.7582926922155112E-005D / (1.0D + Math.pow(2.7182818284590451D, -6.0647527131962784D + 2.3695236118288498E-005D * (-672997.08715902898D + x1) + 3.2023931153981159E-005D * (-201336.0152722373D + x2))) - 0.00023662913637931266D / (1.0D + Math.pow(2.7182818284590451D, (3.8548319451831188D - 3.7893741793439538E-005D * (-672997.08715902898D + x1)) + 3.5387753524373776E-005D * (-201336.0152722373D + x2)))) + 2.6093878869030729E-005D / (1.0D + Math.pow(2.7182818284590451D, (0.69965017972294896D - 2.1188965213485975E-005D * (-672997.08715902898D + x1)) + 3.5449889507588604E-005D * (-201336.0152722373D + x2))) + 0.0134825188698488D / (1.0D + Math.pow(2.7182818284590451D, (6.92614258115802D - 4.0752987467131086E-006D * (-672997.08715902898D + x1)) + 3.5908491017174771E-005D * (-201336.0152722373D + x2))) + 6.684864637617804E-005D / (1.0D + Math.pow(2.7182818284590451D, (0.65239463834319922D - 4.0076723834304629E-005D * (-672997.08715902898D + x1)) + 3.6257695817485433E-005D * (-201336.0152722373D + x2))) + 0.0019550459602656694D / (1.0D + Math.pow(2.7182818284590451D, (-4.971049595752441D - 9.4438301121417256E-006D * (-672997.08715902898D + x1)) + 4.4859162894198169E-005D * (-201336.0152722373D + x2))) + 2.9640714984147809E-006D / (1.0D + Math.pow(2.7182818284590451D, 0.18602229250921642D + 4.7590351538565896E-006D * (-672997.08715902898D + x1) + 5.2450882678957928E-005D * (-201336.0152722373D + x2))) + 5.0230452195512058E-005D / (1.0D + Math.pow(2.7182818284590451D, (-8.8333910442962829D - 1.6967497443386767E-005D * (-672997.08715902898D + x1)) + 8.6393316865199428E-005D * (-201336.0152722373D + x2)))));
}
public static double getCoord2(double x1, double x2) {
System.out.println("x1" + x1);
System.out.println("x2" + x2);
return (47.144830562181802D + 0.64534627421675217D * ((((((((((((280.46608948987097D + 7.8867279451988252E-006D / (1.0D + Math.pow(2.7182818284590451D, (0.43088910069289205D + 1.7477784362661703E-006D * (-672997.08715902898D + x1)) - 8.6244191590044268E-005D * (-201336.0152722373D + x2)))) - 2.3461499358947202E-005D / (1.0D + Math.pow(2.7182818284590451D, 1.1952399290470861D - 1.6606307916253764E-005D * (-672997.08715902898D + x1) - 4.3768025049646288E-005D * (-201336.0152722373D + x2)))) + 0.00029632096445713073D / (1.0D + Math.pow(2.7182818284590451D, 5.3210748528406606D - 6.9452235864817362E-006D * (-672997.08715902898D + x1) - 3.6440901265242433E-005D * (-201336.0152722373D + x2))) + 0.0087952850318136992D / (1.0D + Math.pow(2.7182818284590451D, (3.8453556468691659D + 1.9089618010270258E-005D * (-672997.08715902898D + x1)) - 3.5929980986618083E-005D * (-201336.0152722373D + x2))) + 0.13509975304348121D / (1.0D + Math.pow(2.7182818284590451D, (2.7664128611618413D + 1.8001655600824225E-005D * (-672997.08715902898D + x1)) - 3.5257037925292292E-005D * (-201336.0152722373D + x2))) + 0.00057561478253926332D / (1.0D + Math.pow(2.7182818284590451D, 3.0923948766825489D - 2.7899412830217303E-006D * (-672997.08715902898D + x1) - 3.4766621164612685E-005D * (-201336.0152722373D + x2))) + 2.0598065653489954E-005D / (1.0D + Math.pow(2.7182818284590451D, 6.4567604682975119D - 2.927928601836315E-005D * (-672997.08715902898D + x1) - 3.3063722457097047E-005D * (-201336.0152722373D + x2)))) - 270.51037328212664D / (1.0D + Math.pow(2.7182818284590451D, (2.2526633245219876D + 1.672223927604134E-005D * (-672997.08715902898D + x1)) - 3.2781658879502007E-005D * (-201336.0152722373D + x2))) - 0.0036302662138444105D / (1.0D + Math.pow(2.7182818284590451D, -3.2489031448979682D - 1.1300446502122065E-005D * (-672997.08715902898D + x1) - 2.2764640287316383E-005D * (-201336.0152722373D + x2))) - 6.1684494354533479E-005D / (1.0D + Math.pow(2.7182818284590451D, -2.5489921654109118D - 2.0255274986933403E-005D * (-672997.08715902898D + x1) - 2.2208340178782616E-005D * (-201336.0152722373D + x2)))) + 0.0091436335485149053D / (1.0D + Math.pow(2.7182818284590451D, -2.8117358458046868D - 9.0635926216458289E-006D * (-672997.08715902898D + x1) - 1.9322595066925899E-005D * (-201336.0152722373D + x2)))) - 0.00018408339954775673D / (1.0D + Math.pow(2.7182818284590451D, (2.3790268786282938D + 2.5262814742560466E-005D * (-672997.08715902898D + x1)) - 1.869944319912385E-005D * (-201336.0152722373D + x2)))) + 0.13464206608466678D / (1.0D + Math.pow(2.7182818284590451D, (-0.29024192705092944D + 2.8522169478614636E-006D * (-672997.08715902898D + x1)) - 1.092776805456014E-005D * (-201336.0152722373D + x2))) + 0.067875172757005192D / (1.0D + Math.pow(2.7182818284590451D, -0.15605431142439016D - 2.6535135656094775E-006D * (-672997.08715902898D + x1) - 9.9000815934387571E-006D * (-201336.0152722373D + x2))) + 0.74777641134025807D / (1.0D + Math.pow(2.7182818284590451D, (-1.460645787157641D + 2.9823470152938359E-006D * (-672997.08715902898D + x1)) - 7.1554327696510218E-006D * (-201336.0152722373D + x2)))) - 0.76410196698520449D / (1.0D + Math.pow(2.7182818284590451D, (3.4398988678672473D + 6.7294449825733729E-006D * (-672997.08715902898D + x1)) - 1.0617216099474333E-006D * (-201336.0152722373D + x2)))) + 1.3439062701633362D / (1.0D + Math.pow(2.7182818284590451D, (-0.86663056236054914D - 3.6926799431777393E-006D * (-672997.08715902898D + x1)) + 2.6182558134914578E-007D * (-201336.0152722373D + x2)))) - 0.00087105513727180701D / (1.0D + Math.pow(2.7182818284590451D, (-5.0875668492278114D - 2.1085798223980141E-005D * (-672997.08715902898D + x1)) + 8.0774483474784371E-007D * (-201336.0152722373D + x2))) - 3.1942455287064342D / (1.0D + Math.pow(2.7182818284590451D, -1.0019293009386161D + 1.528960976503242E-006D * (-672997.08715902898D + x1) + 2.4384825340318095E-006D * (-201336.0152722373D + x2))) - 10.819428554936025D / (1.0D + Math.pow(2.7182818284590451D, (-1.2454018294156268D - 8.7754571526760999E-007D * (-672997.08715902898D + x1)) + 3.8710277678527541E-006D * (-201336.0152722373D + x2))) - 7.0759146024107809D / (1.0D + Math.pow(2.7182818284590451D, (4.8040636724161736D - 3.344850100867741E-006D * (-672997.08715902898D + x1)) + 4.1909439076572748E-006D * (-201336.0152722373D + x2))) - 7.5802216810759555D / (1.0D + Math.pow(2.7182818284590451D, 1.9699884424765317D + 4.3444425531227666E-008D * (-672997.08715902898D + x1) + 4.4440737390487265E-006D * (-201336.0152722373D + x2))) - 1.0692144540193364E-005D / (1.0D + Math.pow(2.7182818284590451D, (0.60604991412359599D - 3.7009457200764726E-005D * (-672997.08715902898D + x1)) + 7.5801237945104654E-006D * (-201336.0152722373D + x2))) - 0.0001385321401668817D / (1.0D + Math.pow(2.7182818284590451D, (-2.2628592870084079D - 2.553476924044911E-005D * (-672997.08715902898D + x1)) + 1.7499754761947728E-005D * (-201336.0152722373D + x2))) - 0.080757984937026656D / (1.0D + Math.pow(2.7182818284590451D, (-1.8906687392307646D - 1.2585425781685353E-005D * (-672997.08715902898D + x1)) + 2.5758286072797215E-005D * (-201336.0152722373D + x2))) - 270.29284784434083D / (1.0D + Math.pow(2.7182818284590451D, (-2.2525123989264539D - 1.6722964267440533E-005D * (-672997.08715902898D + x1)) + 3.278293509038775E-005D * (-201336.0152722373D + x2))) - 0.016573034666417387D / (1.0D + Math.pow(2.7182818284590451D, (-1.1609988232405342D - 2.3480990677986659E-005D * (-672997.08715902898D + x1)) + 3.7304467057902967E-005D * (-201336.0152722373D + x2)))) + 0.015151615286564685D / (1.0D + Math.pow(2.7182818284590451D, (-1.1673346213570213D - 2.3759010268590778E-005D * (-672997.08715902898D + x1)) + 3.7525265582526807E-005D * (-201336.0152722373D + x2)))) - 0.00018248225417394912D / (1.0D + Math.pow(2.7182818284590451D, -1.70406415732602D + 1.4489438738100763E-006D * (-672997.08715902898D + x1) + 4.2162421904917551E-005D * (-201336.0152722373D + x2))) - 2.510208689497676E-005D / (1.0D + Math.pow(2.7182818284590451D, (5.6555028704111709D - 4.7453391730256912E-006D * (-672997.08715902898D + x1)) + 5.9943497034881431E-005D * (-201336.0152722373D + x2)))));
}
页:
[1]