[erlang-questions] computers doing maths

Scott Ribe scott_ribe@REDACTED
Tue Mar 19 12:56:40 CET 2019


Well, they're still binary at the foundation, even if they use some form of binary coded decimal.

--
Scott Ribe
scott_ribe@REDACTED
https://www.linkedin.com/in/scottribe/



> On Mar 18, 2019, at 10:12 PM, Richard O'Keefe <raoknz@REDACTED> wrote:
> 
> 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
> digits.
> 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
> BUT
> (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> wrote:
> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list