5 ms·
Yes this is kind of funny. My understanding is that Thomson and Richie deliberately left out non power-of-two word size support (which other languages had at th
by BenoitEssiambre 7y ago
Yes this is kind of funny. My understanding is that Thomson and Richie deliberately left out non power-of-two word size support (which other languages had at the time because cpu manufacturers were adding a couple of bits at a time to new models (Get this years 14bit cpu, two more than last years' cpu!).
To make a more simple, more elegant, more portable language they decided to settle on power-of-two word lengths. This is similar to how Unix came about, leaving out the cruft and complexity from the over engineered Multics.
- anticensor 6y agoThe requirement is not to be power of two, it is to be multiple of sizeof(char).
- BenoitEssiambre 6y agoI guess I just never encountered the 3,5,6,7 bytes word types.
- vardump 6y ago24-bit floats "FP24" at least have been a thing in some ATI graphics cards (R300 & R420) 15+ years ago. Some DSPs have also used (some still do?) 24-bit word width. These odd word widths are anything but common, though.
- ajtulloch 6y agoModern AMD GPUs still support 24 bit integers, see https://rocm.github.io/GCN_Float16.html https://rocm.github.io/GCN_Float16.html.