Re: demonic numbers !

From: Cameron MacKinnon (cmackin+nn_at_clearspot.net)
Date: 02/07/05


Date: Mon, 07 Feb 2005 12:27:57 -0500

Wade Humeniuk wrote:
> Coby Beck wrote:
>
>>
>> This i would like to see!
>> But an interesting experiment might be a multiple choice question you
>> could give to different sets of people:
>>
>> What does .1111 mean?
>>
>> a) .1111d0

This is nonsensical except to some computer programmers. Among the
broader numerate population, the letter d never appears in the middle of
a number.

>> b) 1111/10000

Everyone is taught in primary school that 1111/10000 and 0.1111 are the
same number. Lispers associate fractions with exactitude, but this is
certainly not the case among the broader public.

>> c) 1.111x10e-4

...and they learn that scientific notation is used as a terse notation
for numbers whose significant digits lie far from the decimal point. The
notation implies a physical constant or measurement, which further
implies limited accuracy and finite error.

>> d) all of the above

Programmers tend to make artificial distinctions between the above
number formats, because our languages overload the notation to choose
between various internal representations, something non programmers
don't know about.

> Actually I see that it is meant as .1111... (repeating
> decimal)
>
> which is 1/9

This is reasonable, but I would have lost marks in elementary school if
I'd said that 0.1111 and 0.1111... were equivalent. Further, and this is
key, I don't think casual users and the nearly innumerate would be
surprised if they punched in 0.1111 and the computer used that number
exactly (instead of guessing that 1/9 was desired) for their
calculation. Even if they WERE surprised, there's a logical and
intuitive way to hint to the machine that more digits are required --
just add more digits.

Of course, I don't think there's anything stopping a conforming Lisp
from storing 0.1111 as 3^-2 so people writing portable code shouldn't
depend on it being otherwise.

The quiz writer didn't offer the choice of 7455795/67108864. I wonder
why not?

The whole quiz is bogus. It is attempting to enlighten us on the
question "what should a computer assume about a number, absent context?"
A better question to investigate might be "what can a computer discover
about a number, given context?" Might we not use hints such as whether
the number is involved in indexing, whether it is converted to base 10
(i.e. printed) and with what precision?



Relevant Pages

  • Re: Forth 200x, S\q
    ... Requiring two digits solves ... The C standard solves this by limiting the maximum digits of the ... _octal_ notation to 3. ... not cause much of a transfer problem, because C programmers hardly use ...
    (comp.lang.forth)
  • Re: An uncountable countable set
    ... That is true because of the *definition* of that notation. ... As the representations differ in *every* digit position. ... is required to index the digits of K. ... each digit position of K can be indexed by a number in the list. ...
    (sci.math)
  • Re: An uncountable countable set
    ... That is true because of the *definition* of that notation. ... things like infinite sums in arithmetic.) ... is required to index the digits of K. But that is wrong, ... If a list number An is capable of indexing some digit of 0.111... ...
    (sci.math)
  • Is it time to legitimise REAL*8 etc?
    ... why the Fortran 90 Standard introduced the kind selection functions, ... to programmers who still use this notation that they really ought to use ... something more compatible with the Standard, but I don't think I have ... Few programmers that I ...
    (comp.lang.fortran)
  • Re: Recurring decimal - international question
    ... How would you indicate more than one repeating ... digit with the dot notation? ... one each over the first & last digits ... notation, but I'm interested to hear that it exists, because I re-invented ...
    (sci.math)