Skip to main content
Copy edited (e.g. ref. <https://en.wiktionary.org/wiki/rule_of_thumb#Noun>).
Source Link

Does the "Avoid using floating-point" rule of thumb apply to MCUa microcontroller with Floating Point Unita floating point unit (FPU)?

As a rule of thumbsthumb, I try to avoid using floating-point in my embedded system codebase.
Floating

Floating-point variables are:

  • Computation-intensive
  • Not atomic (can cause problems in an RTOS application or with interrupts)
  • Their precision can cause non-obvious behaviour (float comparison problem).

But what about a microcontroller with a Floatingfloating point unit (like the STM32F4)?

Do those concerns still apply? Would you still advise against using floating-point?

Does the "Avoid using floating-point" rule of thumb apply to MCU with Floating Point Unit (FPU)?

As a rule of thumbs, I try to avoid using floating-point in my embedded system codebase.
Floating-point variables are:

  • Computation-intensive
  • Not atomic (can cause problems in RTOS application or with interrupts)
  • Their precision can cause non-obvious behaviour (float comparison problem).

But what about microcontroller with Floating point unit (like the STM32F4)?

Do those concerns still apply? Would you still advise against using floating-point?

Does the "Avoid using floating-point" rule of thumb apply to a microcontroller with a floating point unit (FPU)?

As a rule of thumb, I try to avoid using floating-point in my embedded system codebase.

Floating-point variables are:

  • Computation-intensive
  • Not atomic (can cause problems in an RTOS application or with interrupts)
  • Their precision can cause non-obvious behaviour (float comparison problem).

But what about a microcontroller with a floating point unit (like the STM32F4)?

Do those concerns still apply? Would you still advise against using floating-point?

Became Hot Network Question
Tweeted twitter.com/StackElectronix/status/1250891737091969024
Source Link
gbt
  • 713
  • 1
  • 6
  • 18

Does the "Avoid using floating-point" rule of thumb apply to MCU with Floating Point Unit (FPU)?

As a rule of thumbs, I try to avoid using floating-point in my embedded system codebase.
Floating-point variables are:

  • Computation-intensive
  • Not atomic (can cause problems in RTOS application or with interrupts)
  • Their precision can cause non-obvious behaviour (float comparison problem).

But what about microcontroller with Floating point unit (like the STM32F4)?

Do those concerns still apply? Would you still advise against using floating-point?