Timeline for Why is the 8-bit exponent of the IEEE 754 32-bit float not byte-aligned?
Current License: CC BY-SA 4.0
21 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 23 at 18:18 | history | reopened | JacquesB CPlus♦ | ||
| S Aug 23 at 8:06 | review | Reopen votes | |||
| Aug 23 at 18:18 | |||||
| S Aug 23 at 8:06 | history | edited | CPlus♦ | CC BY-SA 4.0 | Made the title focus more on the content of the question Added to review |
| Apr 7 at 14:40 | comment | added | petroleus | @SteveSummit this is actually very interesting to me, I've never noticed it. Thank you for that addition | |
| Apr 7 at 12:26 | comment | added | Steve Summit | The other interesting facet of the IEEE-754 bit ordering is that they make the values monotonically ordered when interpreted as raw bit patterns. The exponent is more significant than the significand, and the sign bit is most significant of all. If you take two floating-point values, and as long as they're both positive, if you compare their bit patterns as unsigned integers rather than floating point values, you'll still get the right answer. Zero is less than the subnormals are less than the normals are less than Infinity is less than the NaNs. | |
| Mar 27 at 22:11 | comment | added | petroleus | @Useless, mea culpa, I didn't see the edited answer. Our discussion took place before that moment (I've since accepted it, but do note the timestamps of my comments to it). Thank you nonetheless for drawing the edited answer to my attention, I would've overlooked it | |
| Mar 27 at 22:10 | vote | accept | petroleus | ||
| Mar 27 at 19:17 | comment | added | Useless | @petroleus you say that the question isn't opinion-based because the answers can just be "no", but I wrote an answer exactly like that and you complained that you found it unconvincing, so clearly "no" wasn't an adequate answer after all. | |
| Mar 5 at 7:21 | comment | added | JacquesB | @petroleus IEEE 754 was intended for floating-point units with native support for the full number formats. It would not be prudent to compromise the design to better support 8-but processors without FPU's, which would be a very niche use case. Of course the full numbers (32/64 bit) are byte aligned to fit in memory, but the mantissa/exponent parts are only used separately inside the FPU circuit and not stored individually. | |
| Mar 3 at 18:41 | review | Reopen votes | |||
| Apr 2 at 18:48 | |||||
| Mar 3 at 0:30 | comment | added | petroleus | This question was closed for being "opinion-based", but I don't think this was right; the last paragraph has three questions answerable by factual answers, even if those answers are "no; irrelevant; no because FPUs both at the time and since then have never needed byte-level alignment" | |
| Feb 28 at 20:32 | history | closed | gnat Bart van Ingen Schenau Greg Burghardt | Opinion-based | |
| Feb 28 at 17:00 | answer | added | Useless | timeline score: 4 | |
| Feb 28 at 13:25 | answer | added | gnasher729 | timeline score: 1 | |
| Feb 28 at 12:52 | comment | added | JonasH | @Caleth I mean that It will be difficult to build a IEEE 754 floating point FPU without registers that fit an entire number. And 32 bit floats are historically the smallest IEE754 number, before the fairly resent invention of "Half" | |
| Feb 28 at 12:36 | comment | added | Caleth | @JonasH feasible? Do you mean that 32bits is the smallest floating point can get before fixed point is generally better? | |
| Feb 28 at 9:06 | comment | added | JonasH | I don't think it is feasible to have a FPU without at least 32 bit registers, and it would be trivial for the execution unit(s) to shuffle bits around. I do not see the bus or memory system making any difference, it just needs to move bits around, it would not care what they represent. All the bits needs to be in the register before doing anything anyway. And if you can afford a FPU it makes little sense to couple it to a 8 bit integer unit. | |
| Feb 28 at 2:43 | comment | added | petroleus | I understand that much, but it feels like it'd still be simpler for early circuitry to have byte-aligned fields, if for example the bus was 8-bit or the FPU was fed data by an 8-bit CPU, or a number of other scenarios that might be too convoluted for a comment. It still feels like it might have been slightly more beneficial to have byte-aligned fields (and easier to design circuits for, perhaps), which is what led me to the question. Did they just not care? | |
| Feb 27 at 23:35 | comment | added | JacquesB | For native floating-point processors there is no particular reason to align with byte segments since the circuit is designed specifically to the sizes of the bit fields. For the Z80 library it has to adapt to an 8-bit processor. | |
| Feb 27 at 23:10 | review | Close votes | |||
| Feb 28 at 20:36 | |||||
| Feb 27 at 22:51 | history | asked | petroleus | CC BY-SA 4.0 |