I speak both languages ... but I have problems with an integer bitwise exclusive or logical operator. In javascript it gives me one result, in python it gives me another.
Go ahead, open python and do (-5270299) ^ 2825379669
Now use javascript to do the same calculation and report the result or something else (example http://thorat.org/OS/js.php )
The results are different! I do not know why!
I SHOULD miss something.
JavaScript 32-, Python long, 32 . Python 32 , 32 , :
long
>>> (-5270299 & 0xFFFFFFFF) ^ 2825379669 1472744368L >>> (-5270299 ^ 2825379669) & 0xFFFFFFFF 1472744368L
2825379669 32 .
2825379669
JavaScript - 64- , 32- , , 64- float.
, Python long ( 32 ) .
, JavaScript, , , 64- JavaScript, . , , float int .
No, it is not. Python simply preserves the sign because it can handle large integers.
js> ((-5270299) ^ 2825379669).toString(16) 57c84bb0 >>> hex((-5270299 ^ 2825379669)) '-0xa837b450' >>> hex((-5270299 ^ 2825379669)+2**32) '0x57c84bb0'
Source: https://habr.com/ru/post/1781530/More articles:Android development with Samsung Galaxy tablet - androidEclipse CDT: org.eclipse.cdt.internal.ui.text.CReconciler, java.lang.OutOfMemoryError - eclipseStart a thread using a method pointer - c ++How to see the contra movement and its purpose? - javaBest MySQL setup for quickly changing large text fields? - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1781531/is-it-a-good-or-bad-idea-to-maintain-references-to-assembly-objects-to-avoid-unnecessary-calls-of-assemblyloadfrom&usg=ALkJrhgcR72_sUyVAUmr4Utctmhx24kpNwtelerik mvc grid cell cell data to include columns. Team - c #How to effectively use the result of a function call in a MySQL query several times without calling the function several times? - functionHow do you optimize your MySQL database for writing? - mysqlHow to write code to run once and only once - c #All Articles