<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">I wish people wouldn't say "computers are binary"</div><div class="gmail_default" style="font-family:monospace,monospace">as though this was true of all computers.</div><div class="gmail_default" style="font-family:monospace,monospace">IBM 650: sign + 10 decimal digits in biquinary</div><div class="gmail_default" style="font-family:monospace,monospace">IBM 1620: decimal arithmetic up to the size of store</div><div class="gmail_default" style="font-family:monospace,monospace">IBM 360 and up: decimal arithmetic up to 31 digits<br></div><div class="gmail_default" style="font-family:monospace,monospace">Burroughs Medium Systems (2500 to 4900): decimal</div><div class="gmail_default" style="font-family:monospace,monospace">arithmetic with up to 100 decimal digits, this</div><div class="gmail_default" style="font-family:monospace,monospace">included decimal floats with up to 100 mantissa</div><div class="gmail_default" style="font-family:monospace,monospace">digits.<br></div><div class="gmail_default" style="font-family:monospace,monospace">VAX: decimal string instructions</div><div class="gmail_default" style="font-family:monospace,monospace">Some kind of decimal support for COBOL was actually</div><div class="gmail_default" style="font-family:monospace,monospace">quite common.</div><div class="gmail_default" style="font-family:monospace,monospace">For that matter, ANSI Smalltalk includes</div><div class="gmail_default" style="font-family:monospace,monospace">ScaledDecimal. Sadly, the ANSI standard</div><div class="gmail_default" style="font-family:monospace,monospace">defers to the Language-Independent-Arithmetic</div><div class="gmail_default" style="font-family:monospace,monospace">standard for the semantics of ScaledDecimal,</div><div class="gmail_default" style="font-family:monospace,monospace">something about which LIA-1, LIA-2, and LIA-3</div><div class="gmail_default" style="font-family:monospace,monospace">are by intention completely silent about, with</div><div class="gmail_default" style="font-family:monospace,monospace">the result that there are some truly bizarre</div><div class="gmail_default" style="font-family:monospace,monospace">implementations out there. Squeak is one of</div><div class="gmail_default" style="font-family:monospace,monospace">them: it's ScaledDecimal numbers do decimal</div><div class="gmail_default" style="font-family:monospace,monospace">*formatting* of rational numbers, which rather</div><div class="gmail_default" style="font-family:monospace,monospace">misses the point:</div><div class="gmail_default" style="font-family:monospace,monospace">1/3 asScaledDecimal: 1 ==> 0.3s1</div><div class="gmail_default" style="font-family:monospace,monospace">0.3s1 * s ==> 0.9s1</div><div class="gmail_default" style="font-family:monospace,monospace">BUT</div><div class="gmail_default" style="font-family:monospace,monospace">(1/3 asScaledDecimal: 1) * 3 ==> 1.0s1</div><div class="gmail_default" style="font-family:monospace,monospace">which is rather startling. And Pharo does the same.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 19 Mar 2019 at 15:24, Peter J Etheridge <<a href="mailto:petergi@iinet.net.au">petergi@iinet.net.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px"><div>Dear Erlangers,</div><div>If other novices enjoyed Bryan & RoK's recent discussion about decimals computed in binary machines as much as i did, you might find this 14:24 clip interesting;</div><div><br></div><div><a href="https://www.youtube.com/watch?v=pQs_wx8eoQ8&t=744s" target="_blank">https://www.youtube.com/watch?v=pQs_wx8eoQ8&t=744s</a></div><div><br></div><div>it might be poorly titled, but the content is well presented.<br></div><div><br></div><div>happy coding,</div><div>peter<br></div><br></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>