4 ms·
Not to disagree with you, you highlighted intended use for linux. It touches on something i have wondered about. How far you could get in creating a general pur
by cturner 9y ago
Not to disagree with you, you highlighted intended use for linux. It touches on something i have wondered about. How far you could get in creating a general purpose computing platform with no floating point support at all, including no soft float. If you could avoid float, you could save on implementation costs, and round out a source of bugs downstream. Are there traditions that takes this path?
- rwmj 9y agoSome applications use different/narrower definitions of float. For example GPUs have 16 bit floats and TPUs (ie. AI co-processors) also use narrower floats which are specialized for neural networks. But for a general purpose application/server chip firstly the FPU doesn't really take up much space and secondly if you ship without an FPU then you can never enter certain important markets (eg. HPC).
- amelius 9y agoNote that you can also code the floating point instructions in microcode (a kind of firmware of the CPU).
- deleted 9y ago[deleted]
- amelius 9y agoNot sure why downvoted, but this basically allows you to redefine (within limits) the behavior of opcodes after you have shipped the CPU. I thought that was relevant. https://en.m.wikipedia.org/wiki/Microcode https://en.m.wikipedia.org/wiki/Microcode
- _chris_ 9y agoAnd RISC-V has a "machine mode" which the OS doesn't know about, which is effectively a place to do microcode.
- madez 9y agoThat is a very interesting question. Sometimes a solution to a problem using IEEE-754-arithmetic can be rewritten to use integer arithmetic. Now, what are the problems where IEEE-754-arithmetic is used now, and in what cases it cannot be rewritten? I wouldn't be surprised if music decoding could be done without IEEE-754-arithmetic. Maybe, a specialized codec would have to be used, but I still consider that doable.
- mrob 9y agoMusic decoding is certainly possible without floating point arithmetic. The popular "MAD" MPEG Audio Decoder uses only integer arithmetic: https://www.underbit.com/products/mad/ https://www.underbit.com/products/mad/
- madez 9y agoThanks for pointing this exmple out. Now, I'm also confident that graphics are doable in integer arithmetic. Anybody any ideas where IEEE-754 is mandatory to achieve acceptable performance in individual computing workloads?
- dathinab 9y agoI do not think IEEE-754 is mandatory for any work load, it is just that using fixedpoint arithmetic, especially if mapped onto of a number of common integer types tends to be more complex to implement then simply using float. With fixed point you have to be much more aware about e.g. the min-max-range of values and the precision needed, potentially changing them between different computation steps. If you have any complex math algorithm you should also look into this aspects with float for error calculation etc. So maybe using fixed-point would not be so bad there, but for a lot of "just get it done" tasks people want to just have a float and not bother about it. If you have a way to quickly translate math specific programs using floats + little amounts of meta data into math specific programs using fixed-point arithmetic including error analysis/correction* you probably would get ride of >90% of float requirements, through you would "still" have all that legacy software ;=) [*] If I remember correctly someone did that for Neural Networks using tensorflow, but I don't remember the details
- pjc50 9y agoQuite far. Most cheap microcontrollers have no FPU an may not even have integer divide; PICs advertise whether or not they have a multiplier as a product feature. Fixed-point is often a reasonable substitute for floating point, if you have enough bits; Doom uses it for its 2.5D rendering. However, all your software has to be defined with this in mind. Otherwise you have to have soft-float in order to run it at all, which is horribly slow.