Consider this proposal: In Interval, rename "qinterval" to "rinterval" (for round interval), and rename "exactInterval" to "qinterval".
Yes, there are other inaccuracies in Interval, that can be fixed later. I propose this change to make the interface clear and consistent. - Qian On 5/14/26 10:35 AM, Waldek Hebisch wrote: > On Wed, May 13, 2026 at 05:15:49PM +0800, Qian Yun wrote: >> Regarding qinterval, documentation in AIntervalCategory says >> ++ qinterval(inf,sup) creates a new interval without checking the >> ++ ordering on the elements. >> >> Implementation in Interval says >> qinterval(i : R, s : R) : % == >> [roundDown i, roundUp s] >> >> >> I think in Interval we should have "qinterval(i, s) = [i, s]", >> and have a local function that uses "[roundDown i, roundUp s]". >> And choose to use one or the other wisely depending on the situation. > > Let me say that relation between AInterval and Interval is not > a easy one, they have quite different motivation. Motivation > for Interval is to have exact computations, that is true result > of computation should be contained in the resulting interval. > By neccesity size of such interval depends on effort that we > ready to spent on it. Large intervals say very litte about > result, so we do not care so much if they are somewhat bigger > than necessary. OTOH we would like to limit growth of small > intervals. > > As I wrote we want that result of operations contain true > result. I must say that it is not clear to me if this property > holds for Interval. Namely, "^" for Interval looks fishy, > in general floating point power can have higher error than > simple operations and then correction done by 'roundUp' and > 'roundDown' is too small to ensure correctness. Due to this > I consider all "complex" operations in Interval to be highly > suspect, and hence of limited use. > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/10612be8-4432-4e81-9fe6-2db90a52e430%40gmail.com.
