Skip to main content
added 111 characters in body
Source Link
Bubbler
  • 79.3k
  • 5
  • 162
  • 484

Jelly, 1313 9 bytes

;0+H^/&$BU_;0+HBU_/U 

Try it online!Try it online!

-4 bytes (^/&$ removed) thanks to @m90's observation that we don't need to clear shared 1 bits.

Look ma, no Unicode!

Literal translation of Prodinger's algorithm. x3 goes before xh, and U is used twice to align the binary representations of the two.

Jelly, 13 bytes

;0+H^/&$BU_/U 

Try it online!

Look ma, no Unicode!

Literal translation of Prodinger's algorithm. x3 goes before xh, and U is used twice to align the binary representations of the two.

Jelly, 13 9 bytes

;0+HBU_/U 

Try it online!

-4 bytes (^/&$ removed) thanks to @m90's observation that we don't need to clear shared 1 bits.

Look ma, no Unicode!

Literal translation of Prodinger's algorithm. x3 goes before xh, and U is used twice to align the binary representations of the two.

Source Link
Bubbler
  • 79.3k
  • 5
  • 162
  • 484

Jelly, 13 bytes

;0+H^/&$BU_/U 

Try it online!

Look ma, no Unicode!

Literal translation of Prodinger's algorithm. x3 goes before xh, and U is used twice to align the binary representations of the two.