What is JavaScript for? >>

I am translating a JavaScript algorithm into PHP, and I came across a → symbol, and I don't know what that means. It's hard to search google for characters, so can someone tell me what that means?

+3
source share
4 answers

This is a shift of the sign of the shift to the right . Many, many languages ​​have this operator.

Wikipedia has a good article on this topic. My first link has a few examples and an explanation.

+1
source

This is the operator with a slight shift: http://www.contactor.se/~dast/fpl-old/language/shift.HTML

+2
source

, : x ,

x >> y

floor(x / (2 ** y))

2 ** y 2, y.

eg. x >> 3matches with floor(x / 8).

+1
source

Bitwise shift to the right

It looks like PHP also has this statement:

http://us2.php.net/operators.bitwise

0
source

Source: https://habr.com/ru/post/1717892/


All Articles