Re: [stella] OT: Programming

Subject: Re: [stella] OT: Programming
From: "Roger Williams" <mer02@xxxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 20:20:03 -0700
> > There are certain things you need to know no matter WHAT kind
> > of programming you are doing.  For example, no computer has
> > ever been built that can represent a real number.
>
> Ummm... don't you mean a real fraction? Last time I checked, integers
aren't
> imaginary. :)

I mean a Real Number, which has infinite precision.  As a matter of fact
all computers DO represent is fractions -- usually fractions of 0.1 or 1/2,
though other systems are encountered infrequently.

What no computer does is implement real numbers that will always
function as you are taught they will in algebra, trigonometry, and calculus
class.  The limitations of the finite math always break down somewhere.
Sometimes "somewhere" is surprisingly close to home.

> Aren't there some languages that actually internally represent fractions
as,
> well... fractions?

Sure.  They are limited by the extent of the numerator and denominator.
There are real numbers they can't represent.  Sometimes those real numbers
that can't be represented become important to you.

> In any case, if a computer hasn't been built that can represent them, then
a
> mathematical system hasn't been built that can represent them either.

Of course it has.  Mathematical systems have even been built -- and a long,
long, long time ago by the ancient Greeks -- which represent numbers that
aren't real, but are irrational.  This is not even to get into things like
limits
and the methods of differential and integral Calculus, which don't work at
all except as carefully controlled approximations on computers.

There are an infinite number of real numbers.  No computer can represent
an infinite number of states.  This sounds lofty and theoretical but I can
tell you from experience that it sometimes has nasty and unexpected
practical consequences.  This is the sort of thing you should know if you
are writing software whose output is important to someone.

This is far OT I know, but in a sense it's not OT at all.  Stella forces
you to keep this truth, which is hidden in most modern environments,
at the front of your mind.  Programmers are like grape vines.  Those
that produce the best results -- whether wine or software -- are
the ones that have to fight to produce anything at all.

--Roger Williams



-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread