<div dir="ltr"><div dir="ltr">On Thu, Jan 10, 2019 at 8:22 AM Henry Baker <<a href="mailto:hbaker1@pipeline.com">hbaker1@pipeline.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If I'm trying to find a leak in my sewer or water pipe, I<br>
can choose from a large variety of colored and/or fluorescent<br>
dyes, which are easily detected when they appear outside the<br>
pipe.<br>
<br>
Ditto for radioactive tracers for even tinier leaks.<br>
<br>
Are there standard digital *codes* (other than 0xdeadbeef)<br></blockquote><div> </div><div>No standard codes.  Much depends on the data and data structures.<br><br>I have seen off by one address get stuffed in memory.  If the system <br>wants word addresses to be aligned then adding one to a pointer thing could<br>trigger an exception.  This works for return stacks and structures of pointers </div><div>and such but not data.<br><br>Data knowledge allows initializing or dismissing data and tagging it with <br>known to be impossible floating point numbers...  Even.. standard special numbers.<br>i.e. the US population is less than 1 billion and not negative.  Time of day<br>structures set to epoch + 7 seconds or some impossible date in prehistory.<br><ul style="font-family:Helvetica,Arial,sans-serif;color:rgb(0,0,0);font-size:medium;background-color:rgb(255,255,238)"><li style="list-style-type:square;font-size:15px;line-height:20px">There are separate <strong>positive and a negative zero</strong> values, differing in the sign bit, where all other bits are 0. These must be considered equal even though their bit patterns are different.</li><li style="list-style-type:square;font-size:15px;line-height:20px">There are special <strong>positive and negative infinity</strong> values, where the exponent is all 1-bits and the significand is all 0-bits. These are the results of calculations where the positive range of the exponent is exceeded, or division of a regular number by zero.</li><li style="list-style-type:square;font-size:15px;line-height:20px">There are special <strong>not a number</strong> (or NaN) values where the exponent is all 1-bits and the significand is <em>not</em> all 0-bits. These represent the result of various undefined calculations (like multiplying 0 and infinity, any calculation involving a NaN value, or application-specific cases). Even bit-identical NaN values must <em>not</em> be considered equal.</li></ul></div></div>NaN handing is handy... Too often code ignores floating exceptions like divide by zero.<br>Data structures can be expanded to include a tag: white, black, grey in the style of garbage collecting.<br>Perhaps with an ifdef DEBUG preprocessor  and assert()<br><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">   T o m    M i t c h e l l<br></div></div></div></div></div></div></div>