Re: 0 * X = null?

From: The Ghost In The Machine (ewill_at_sirius.athghost7038suus.net)
Date: 01/30/05


Date: Sun, 30 Jan 2005 23:01:51 GMT

In sci.math, mensanator@aol.compost
<mensanator@aol.com>
 wrote
on 30 Jan 2005 13:36:42 -0800
<1107121002.443670.250520@f14g2000cwb.googlegroups.com>:
>
> The Ghost In The Machine wrote:
>> In sci.math, snafu
>> <nastyman514@yahoo.com>
>> wrote
>> on 30 Jan 2005 06:21:55 -0800
>> <1107094914.979720.18520@f14g2000cwb.googlegroups.com>:
>> > A buddy from the local university said that there's a theory going
>> > around that might mean they'll have to change all the math
> textbooks
>> > and computer chips, and that the earth will explode.
>> >
>> > He stated that 0 * X <> 0. Instead, 0 * X = null.
>> >
>> > Because I'm not a college guy, he put it in simple terms for my
> simple
>> > mind.
>> >
>> > Him: "If you had 2 Xs, you'd have 2 * X. If you had 1 X, you'd
> have 1
>> > * X. If you had 0 Xs, you would have 0 * X (nothing), not 0. You
>> > would not have a 0, because 0 is a thing (it's a number). Only
> 'null'
>> > is nothing."
>> >
>> > Me: (thinking that almost sounds logical?!)
>> >
>> > He went on to say that's why X / 0 = undefined.
>> > Is he right about his theory?
>> >
>>
>> Assuming X has an arithmetic inverse, then 0 * X = (1 + (-1)) * X =
> 0.
>>
>> One reason why 0 * oo is undefined is that oo has no such
>> inverse; oo - oo can be anything at all. Apples don't
>> have arithmetic inverses, although one might owe an apple.
>>
>> 0 is occasionally called null or nil, though such usage is
>> presumably deprecated at this point to placate those who
>> want to reserve null (or perhaps NULL) to mean a machine
>> address/pointer that points nowhere, and those in the
>> LISP world who want to reserve nil to mean the opposite of t,
>> the traditional LISP tokens used for false and true.
>
> It has nothing to do with placating, NULL is not 0 and to use
> it as such is absolutely wrong.

I agree it's wrong, certainly in the scientific arena where
one has to distinguish between null (no data) and zero (a
zero data point). Of course, not all of us are scientists. :-)

> One only has to look at the
> problems such false usage causees in Excel (which does not
> understand the concept of NULL).

Ew.

Fortunately for me, OpenOffice Calc gives me an average of 5.5
for a column with some nulls in it, as opposed to 3.93 when
I replace the empty cells with explicit zeroes.

(Not that I do a lot of spreadsheeting anyway. The sum,
of course, is unaffected.)

Unfortunately, NULL - 0 = 0 in Calc. (This is as of 1.1.4.
Looks like it might be a bug.)

> In Excel, blank cells are
> interpreted as 0 and you have to take precautions to prevent
> problems when graphing data with blank cells or doing
> statistics.
>
> Contrast this with Access, where NULLs are properly understood.
> In Access, a NULL is never mistaken for a 0 and when used in an
> equation, always produces the correct answer: NULL.
>
> For example, given the top of casing of a well as 405 ft-MSL
> and a measured depth to water of 15 ft, the water table is
> calculated to be 390 ft-MSL. When said well is not measured,
> we still create a record for it in the database to document
> why it was not measured
>
> Well DepthToWater Comment
> G032 Fire ants built nest on well
>
> If the NULL in the DepthToWater field is interpreted as 0,
> that would imply the water table is flush with the top of the
> well and that the entire site is flooded.

Might be a good idea, that -- to get rid of the fire ants. :-)
But I see your point.

> Since any calculation
> involving a NULL returns a NULL, the
>
> WaterTableElevation = TopOfCasing - DepthToWater
>
> correctly returns NULL instead of falsely returning 405.
> Of course, the program that plots the water table surface must
> then interpolate across the gap in the data, but it is designed
> to do that. What it cannot do is resolve false data. No data
> is always preferable to false data.
>
>>
>> As for numbers being things -- numbers cannot be things;
>> they're abstract concepts.
>>
>> --
>> #191, ewill3@earthlink.net
>> It's still legal to go .sigless.
>

-- 
#191, ewill3@earthlink.net
It's still legal to go .sigless.