Although many single-chip computers can realize hard floating point now.
Single-chip microcomputer without FPU (hardware floating-point operation unit) can also perform floating-point operation.
In this case, the compiler implements it by assembling "soft".
Floating-point operation has nothing to do with single chip microcomputer, but the key is that the compiler should support it. At present, most compilers support the definition and use of floating point.
The disadvantage of soft floating point is time-consuming.
For MCU without FPU, there is a common optimization method:
Involving floating-point operations, you can multiply the decimal by 10 to the n power (a* 10000 ...).
Then use plastic or long plastic to calculate.
After the calculation is completed, it is finally divided by the n power of 10, and then changed back to decimal (a/ 10000 ...).
In this way, a lot of calculation processes are plastic operations, with less machine code and faster speed.