Käynnissä

I need this Java and Javascript code to be compatible.

$30 BIDS ONLY !

-----

The person who completes this project and sends me a working example first will be selected and paid $30

It should be very simple for someone who is fluent in both Java and Javascript.

-----

I am trying to create a Mersenne Twister shuffle that will produce the same output on Java and also Javascript. From what I can see the code in these two scripts is almost identical but the results are so different!

Also only Java seams to return negative integers.

Javascript Code: [url removed, login to view]

var mt = new MersenneTwister19937();

mt.init_genrand(12345);

for (var i=0; i<20; i++) {

[url removed, login to view](mt.genrand_int32()+"");

}

Java Code: [url removed, login to view]

MersenneTwister mtr = new MersenneTwister(12345);

for (int i=0; i<20; i++) {

[url removed, login to view]([url removed, login to view]());

}

Outputs:

JavaScript:

2847377021

617618678

1337623186

3689422343

732512675

4623254

2107256132

1636985787

2201192414

2246148103

3657303495

1704011860

3561291085

97059663

2124306653

3003342355

3924175650

924390270

3493812673

2808162218

Java:

-302296606

-471781915

1358822685

561383553

789925284

170765737

878579710

-745451138

-1856606875

-2009710046

-1737122275

-187647231

-152408970

1983958385

-1489593029

-327542130

-1078437783

1605979227

-1487906057

665605494

I need these to be identical when the same seed is used. So the output lists should be the same.

Taidot: Java, Javascript

Näytä lisää: int i, integers and, simple javascript project example, java code example, java simple example, java simple example project, javascript write, mersenne twister, javascript java code convert, shuffle project, convert code javascript java, java scripts, convert javascript java code, javascript person, simple java project output, write simple javascript, need someone java project, code convert javascript java, pastebin, create pastebin, project javascript code, project bids java, javascript selected, javascript paid, java project output

About the Employer:
( 1 review ) Melbourne, Australia

Projektin tunnus: #4297243

Myönnetty käyttäjälle:

wanly3643vw

I know where the problem is, please check the PMB.

30 $ USD 1 päivässä
(36 arvostelua)
4.2

2 freelanceria on tarjonnut keskimäärin 30 $ tähän työhön

sunsoftpro

Please contact me know so that ours discuss then I start to perform job, now. Your job will complate in abit hours. Best regards! ===================================

30 $ USD 1 päivässä
(37 arvostelua)
5.3