Re:Fixed Point Arithmetic
by dreamcompiler on Sunday October 17, 2021 @11:32PM
(#28901992)
Several years ago I wrote a signal-processing kernel module for realtime interrupt handling in Linux. Surprise! You cannot do floating point in the kernel. So I wrote it all in fixed point.
ISTR the reason you couldn't use floats in the kernel had more to do with context switching and the kernel not spilling the FP registers than speed per se, but I might be misremembering.
ISTR the reason you couldn't use floats in the kernel had more to do with context switching and the kernel not spilling the FP registers than speed per se, but I might be misremembering.
Edit: Looks like I remembered it basically right:
https://stackoverflow.com/questions/13886338/use-of-floating...