Skip to content

Instantly share code, notes, and snippets.

@michaeljclark
Last active February 26, 2022 21:05
Show Gist options
  • Save michaeljclark/22df84615b5bf8085a084ec14995f8bd to your computer and use it in GitHub Desktop.
Save michaeljclark/22df84615b5bf8085a084ec14995f8bd to your computer and use it in GitHub Desktop.
table of single-byte encodings for the vf128 variable-length floating-point number format
0 ▄▄▄▄ 0.0000 1 ▄▄▄▟ 0.0625 2 ▄▄▄▙ 0.1250 3 ▄▄▄█ 0.1875 4 ▄▄▟▄ 0.2500 5 ▄▄▟▟ 0.3125 6 ▄▄▟▙ 0.3750 7 ▄▄▟█ 0.4375
8 ▄▄▙▄ 0.5000 9 ▄▄▙▟ 0.5625 10 ▄▄▙▙ 0.6250 11 ▄▄▙█ 0.6875 12 ▄▄█▄ 0.7500 13 ▄▄█▟ 0.8125 14 ▄▄█▙ 0.8750 15 ▄▄██ 0.9375
16 ▄▟▄▄ 1.0000 17 ▄▟▄▟ 1.0625 18 ▄▟▄▙ 1.1250 19 ▄▟▄█ 1.1875 20 ▄▟▟▄ 1.2500 21 ▄▟▟▟ 1.3125 22 ▄▟▟▙ 1.3750 23 ▄▟▟█ 1.4375
24 ▄▟▙▄ 1.5000 25 ▄▟▙▟ 1.5625 26 ▄▟▙▙ 1.6250 27 ▄▟▙█ 1.6875 28 ▄▟█▄ 1.7500 29 ▄▟█▟ 1.8125 30 ▄▟█▙ 1.8750 31 ▄▟██ 1.9375
32 ▄▙▄▄ 2.0000 33 ▄▙▄▟ 2.1250 34 ▄▙▄▙ 2.2500 35 ▄▙▄█ 2.3750 36 ▄▙▟▄ 2.5000 37 ▄▙▟▟ 2.6250 38 ▄▙▟▙ 2.7500 39 ▄▙▟█ 2.8750
40 ▄▙▙▄ 3.0000 41 ▄▙▙▟ 3.1250 42 ▄▙▙▙ 3.2500 43 ▄▙▙█ 3.3750 44 ▄▙█▄ 3.5000 45 ▄▙█▟ 3.6250 46 ▄▙█▙ 3.7500 47 ▄▙██ 3.8750
48 ▄█▄▄ inf 49 ▄█▄▟ nan(0x1) 50 ▄█▄▙ nan(0x2) 51 ▄█▄█ nan(0x3) 52 ▄█▟▄ nan(0x4) 53 ▄█▟▟ nan(0x5) 54 ▄█▟▙ nan(0x6) 55 ▄█▟█ nan(0x7)
56 ▄█▙▄ nan(0x8) 57 ▄█▙▟ nan(0x9) 58 ▄█▙▙ nan(0xa) 59 ▄█▙█ nan(0xb) 60 ▄██▄ nan(0xc) 61 ▄██▟ nan(0xd) 62 ▄██▙ nan(0xe) 63 ▄███ nan(0xf)
64 ▟▄▄▄ -0.0000 65 ▟▄▄▟ -0.0625 66 ▟▄▄▙ -0.1250 67 ▟▄▄█ -0.1875 68 ▟▄▟▄ -0.2500 69 ▟▄▟▟ -0.3125 70 ▟▄▟▙ -0.3750 71 ▟▄▟█ -0.4375
72 ▟▄▙▄ -0.5000 73 ▟▄▙▟ -0.5625 74 ▟▄▙▙ -0.6250 75 ▟▄▙█ -0.6875 76 ▟▄█▄ -0.7500 77 ▟▄█▟ -0.8125 78 ▟▄█▙ -0.8750 79 ▟▄██ -0.9375
80 ▟▟▄▄ -1.0000 81 ▟▟▄▟ -1.0625 82 ▟▟▄▙ -1.1250 83 ▟▟▄█ -1.1875 84 ▟▟▟▄ -1.2500 85 ▟▟▟▟ -1.3125 86 ▟▟▟▙ -1.3750 87 ▟▟▟█ -1.4375
88 ▟▟▙▄ -1.5000 89 ▟▟▙▟ -1.5625 90 ▟▟▙▙ -1.6250 91 ▟▟▙█ -1.6875 92 ▟▟█▄ -1.7500 93 ▟▟█▟ -1.8125 94 ▟▟█▙ -1.8750 95 ▟▟██ -1.9375
96 ▟▙▄▄ -2.0000 97 ▟▙▄▟ -2.1250 98 ▟▙▄▙ -2.2500 99 ▟▙▄█ -2.3750 100 ▟▙▟▄ -2.5000 101 ▟▙▟▟ -2.6250 102 ▟▙▟▙ -2.7500 103 ▟▙▟█ -2.8750
104 ▟▙▙▄ -3.0000 105 ▟▙▙▟ -3.1250 106 ▟▙▙▙ -3.2500 107 ▟▙▙█ -3.3750 108 ▟▙█▄ -3.5000 109 ▟▙█▟ -3.6250 110 ▟▙█▙ -3.7500 111 ▟▙██ -3.8750
112 ▟█▄▄ -inf 113 ▟█▄▟ -nan(0x1) 114 ▟█▄▙ -nan(0x2) 115 ▟█▄█ -nan(0x3) 116 ▟█▟▄ -nan(0x4) 117 ▟█▟▟ -nan(0x5) 118 ▟█▟▙ -nan(0x6) 119 ▟█▟█ -nan(0x7)
120 ▟█▙▄ -nan(0x8) 121 ▟█▙▟ -nan(0x9) 122 ▟█▙▙ -nan(0xa) 123 ▟█▙█ -nan(0xb) 124 ▟██▄ -nan(0xc) 125 ▟██▟ -nan(0xd) 126 ▟██▙ -nan(0xe) 127 ▟███ -nan(0xf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment