Integer byte encoding peculiarity: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

17 November 2023

  • curprev 15:5615:56, 17 November 2023Gneale talk contribs 647 bytes +647 Created page with "===== Return to: Chialisp ===== According to Matt Howard 20210816, there is a "peculiarity with how integers are encoded in bytes. It's signed integers. If you just return <code>run '(q . 0xd7)'</code> you get -41 because the most significant bit is set and that's telling the interpreter to read this as a negative number. If you add some leading zeroes <code>run '(q . 0x00d7)'</code>, it should pop out as you would expect". Returns 215. <h1>Orig..."