Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
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:
|