How Can I Use plot2d code for presence of singularities?



>>>>> "Richard" == Richard Fateman <fateman at eecs.berkeley.edu> writes:

    Richard> On 1/3/2013 9:41 AM, Henry Baker wrote:
    >> This is why the interval code in my type inference package (section 7.3 in link below) has a union of disjoint intervals, rather than a single interval.
    Richard> Using unions of disjoint intervals has some advantages --- Mathematica
    Richard> and Maple both use this, I think.

FWIW, cmucl's type-inference also uses unions of disjoint intervals
when necessary.

It also suffers from not rounding down the left limit and rounding up
the right limit of intervals.  This has lead to a few rare cases where
the compiler made bad assumptions.  This mostly happened with the
80-bit x87 float registers.

    Richard> Disadvantages include:
    Richard> Contrary to the needs of some platforms, intervals cannot be stored in
    Richard> a fixed size (2 double-floats, e.g.) but
    Richard> require memory allocation mechanisms.

    Richard> Computing gets messier.

There are some examples of lisp code that causes cmucl to take an
inordinately long time to compile because the union of disjoint
intervals becomes vary large.  As hack, if the union contains too many
intervals (500?), they're all collapsed into one interval that is a
superset of the union.

    Richard> One alternative is to have exterior intervals.  That is 1/[-1,1]
    Richard> becomes  [1, -1]  where the latter represents [-infinity,-1] U

I assume you meant to write ]1, -1[ instead of [1,-1].

    Richard> [1,infinity].
    Richard> (or if you join the reals at +- inf, it is all of them except [0,1].

To do more inference with these exterior intervals, don't you
basically end up dealing with a union of intervals anyway?

Ray