Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: about emp, mult by zero, exact results, exact endpoints.



Thanks for the references.

Widest need coercion seems to be the right idea for combining floats and finite-length integers. (4,8,16).
It's a good idea for conventional languages like C, FORTRAN, etc.  I'm glad it can serve interval
arithmetic too.

It does not seem to quite cover those systems (Mathematica, Maple, Maxima, GMP, MPFR..))
 that support arbitrary precision integers or rationals.

Thus [1/3,1], in my view, has exact endpoints and no way of determining widest need coercion.

It is amusing to consider that [1/3, 0.1d0] could either be converted, with some loss,
to two floats [0.3333...3, 0.1d0]
or without loss to two rationals,

[1/3,   3602879701896397/ 2^55]

Since there is no overflow or underflow or rounding in exact rationals, it makes the formulation
of programs much easier, at least ones solely with rational operations, if we use the latter.

Unfortunately it also makes for a much slower computation, and does not accommodate
roots, log/exp, etc.   Slower because -- not only do the widths of the intervals tend
to grow (exponentially), but the length of the numerators and denominators of the
 ratios denoting the endpoint tend to grow (also exponentially).

As a practical matter, I think intervals with float endpoints are most useful,
and therefore troubling issues like under/overflow, rounding, traps, etc. come up.
And widest need helps there. The implementation I've been writing uses it, but
also combines rationals to give rationals when possible. For sin(rational) it
converts the argument to double-float, but could make easily be changed for
some other width.

I still don't know what sin(ILL) or sin(EMP) should be...

RJF


On 2/12/2013 10:15 AM, G. William (Bill) Walster wrote:


Widest-Need _expression_ processing provides a consistent and elegant solution to the problem of how to evaluate mixed-mode expressions.

It exists as an option in Sun's implementation of interval arithmetic in its Fortran compiler.  See:

<http://www.google.com/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8#q=oracle%20widest-need&nfpr=1&ei=8YUaUaG8AszFiwKx3IDIBw&sqi=2&start=0&ion=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.42261806,d.cGE&fp=d5e4bc415c21e72b&biw=1024&bih=895>

and the two attached papers.