What is Nostr?
Larry (Mr. Prototype) /
npub1tfj…heyg
2023-08-24 07:53:26

Larry (Mr. Prototype) on Nostr: I've been on a mission to "integerify" (remove floating point math) from ...

I've been on a mission to "integerify" (remove floating point math) from microcontroller code for a long time. I just got reminded why yesterday with my CH32V003 FLASH space problem. My normal take is to create integer values 10x the actual to get a single decimal place of precision. For example, temperature sensors - a value of 23.7C would be returned as 237. The sensor is not that precise anyway, so why use fp math? Does anyone else do this? If so do you have a different method?
Author Public Key
npub1tfjzsqu6aa9yz59fhnqq5akexgzhec9jhvpvmdw6mnd95xdvvxmsadheyg