Ages ago, the Digital Equipment VAX had a hardware hack where a null pointer (value is 0) would return a 0 when de-referenced. Which is the null character, the end of a string. So most of the time operations moving characters would terminate correctly. Obviously not portable to other computers.In the IEEE 754 floating point definition, there are specific values for errors: mathematically undefined, division by zero, overflow, underflow, and inexact. These MUST be implemented in hardware to meet the specification.
carlosneves|1 year ago
But overall, having dedicated "error modes" seems to be the preferred route.
Thanks for the reply!
I wasn't aware of the VAX series of computers, successors of the PDPs. I knew Unix was first written on a PDP-11. Also wasn't aware of the hardware requirements for floating points.