Re: A numerical methods viewpoint on OO/FP/Relational

From: peter_douglass <baisly_at_gis.net>
Date: Sun, 8 Jul 2001 01:09:16 -0400
Message-ID: <9i8pqj$181$1_at_taliesin.netcom.net.uk>


minor corrections:

>>> fact 0 = 0
>>> fact n = n * (fact (n-1))

should be

fact 0 = 1
fact n = n * (fact (n-1))

>>> Now the factorial function is a fixed point of these equations, but so
 is
>>> the function that always returns an error.

should be

Now the the factorial function is a fixed point of these equations, but so is the value "error", for a particular interpretation of "error". Rather than give a rigorous explanation of that interpretation, I will give an analogy.

  Many engineering fields use what is known as a dirac delta function to model some discontinous equation. The dirac delta function may be thought of as a function that has an infinite height at the value 0, and a zero value everywhere else. It also has the property that the "area" under its curve = 1. No _real_ function can have these properties, but luckily, the dirac delta function can be used "as if" it were a real function, and the math works out properly. Now the anology. Think of "error" as the contents of the empty set. If we define x to be a solution to a system of equations whose solution set is empty, we may say that x has the value "error". However, since the empty set is a subset of any other set, "error" is a potential value whenever we define a variable to be the solution to a system of equations. We generally don't want an error value if there is another more satisfactory value, so we order solutions as follows:

Undefined (bottom) < ordinary values < Error (top)

and when we ask for _the_ solution to a system of equations, we mean the "least" solution. Hope this clarifies things. (Yeah right ;-)

--PeterD Received on Sun Jul 08 2001 - 07:09:16 CEST

Original text of this message