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.

-- 
                              Waldek Hebisch

-- 
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/agU08Qe2ITKvQu3f%40fricas.org.

Reply via email to