Friday 23 November 2018

DIY FP - Implementing floating point math on a microcontroller without a hardware FPU


I'm working on a little personal project (targeting a Parallax Propeller, but this should be pretty generalizable) that needs floating point math.


The micro-controller I am working with does not have native floating point, or a stock floating-point library.



Are there any good resources or tutorials on implementing software floating-point math? Preferably on really limited resources (I don't even have a stack!).




I'd like to support double sized floats. The propeller is a 32 bit MCU, so I'll have to use multiple variables for each float.


I know there is one software-floating-point library for the propeller out there, but it only supports single sized floats.


No, I probably don't really need double sized floats, but this sounds like a really interesting project. Half the reason I want to do this is because I'll learn a lot along the way.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...