[erlang-questions] computers doing maths

Richard O'Keefe raoknz@REDACTED
Tue Mar 19 05:12:57 CET 2019

I wish people wouldn't say "computers are binary"
as though this was true of all computers.
IBM 650: sign + 10 decimal digits in biquinary
IBM 1620: decimal arithmetic up to the size of store
IBM 360 and up: decimal arithmetic up to 31 digits
Burroughs Medium Systems (2500 to 4900): decimal
arithmetic with up to 100 decimal digits, this
included decimal floats with up to 100 mantissa
VAX: decimal string instructions
Some kind of decimal support for COBOL was actually
quite common.
For that matter, ANSI Smalltalk includes
ScaledDecimal.  Sadly, the ANSI standard
defers to the Language-Independent-Arithmetic
standard for the semantics of ScaledDecimal,
something about which LIA-1, LIA-2, and LIA-3
are by intention completely silent about, with
the result that there are some truly bizarre
implementations out there.  Squeak is one of
them: it's ScaledDecimal numbers do decimal
*formatting* of rational numbers, which rather
misses the point:
1/3 asScaledDecimal: 1  ==> 0.3s1
0.3s1 * s ==> 0.9s1
(1/3 asScaledDecimal: 1) * 3 ==> 1.0s1
which is rather startling.  And Pharo does the same.

On Tue, 19 Mar 2019 at 15:24, Peter J Etheridge <petergi@REDACTED>

> Dear Erlangers,
> 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;
> https://www.youtube.com/watch?v=pQs_wx8eoQ8&t=744s
> it might be poorly titled, but the content is well presented.
> happy coding,
> peter
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190319/e0d94db7/attachment.htm>

More information about the erlang-questions mailing list