Earlier quoted context omitted.
An example, I'm unable to resolve so far: ISO 26262 includes the requirement to prevent “implausible values, execution errors, division by zero, and errors in data flow and control flow” (8.4.4). I'm confident the division by zero aims at integer division because the result is undefined. For floating point, division-by-zero is perfectly fine and well defined by IEEE 754. Nevertheless, our safety folks require us to e…
I worked briefly in the ISO 26262 space. While I don't have a copy of it in front of me, my understanding was not so much that you must prevent division by zero, as much as it is that you handle division by zero appropriately . Appropriately means that you can show that if you get a divide by zero, safety is not compromised. If I get an Inf or a NaN in a calculation involving cruise control, and I do nothing to handl…
You are correct that it is possible in general. However, in this specific project, the decision was to shut down the device for safety reasons if the CPU detects a floating point division by zero. In my opinion this reduces the availability of the functions unnecessarily.