← Back to the chapter · Next detail →
Technical detail · Choosing a Programming Language
Numeric and Timing Boundaries
Floating-point numbers store a value with a scale that can vary, allowing a wide range with finite precision. Fixed-point arithmetic stores an integer with an agreed scale, such as hundredths of a degree; it has a fixed resolution and range. Both can round, but they may round differently.
A language boundary is also a unit, timing, ownership, and failure boundary. Bugs often appear when a host script uses floating-point units differently than firmware, a gateway changes null handling, a dashboard assumes fresh state, or a firmware port changes payload field names.
Numeric and timing differences are common. Python may use floating point comfortably while firmware moves to fixed-point integer math. JavaScript may treat missing, null, and undefined values differently from a C struct decoder. A Rust no-std build may avoid heap allocation while a gateway implementation uses dynamic JSON parsing. An event loop on Node.js can hide blocking calls that would starve a microcontroller control loop. The shared tests should catch unit conversion, rounding, stale-state, and missing-field behavior before those differences reach a pilot.