On Mon, Jun 23, 2025 at 08:12:06AM +0200, 'Ralf Hemmecke' via FriCAS - computer algebra system wrote: > On 6/23/25 01:22, Waldek Hebisch wrote: > > ATM I did not look at conditions and categories. However, > > I have noticed a different issue. Namely, Interval is > > supposed to be an implementation of interval artithmetic. > > Which means that interval obtained as result of > > interval arithmetic is supposed to contain interval > > computed using infinitely precise artithmtic. Since > > operations in Float are approximate it means that > > results of arithmetic operations on intervals need to be > > enlarged to compensate for effect of rounding. This > > is done by use of roundUp and roundDown in qinterval. > > Right. That is why qInterval has no default implementation. And Interval > does not inherit anything from AInterval only from AIntervalCategory. > AInterval is for the exact case, Interval for Floating point intervals.
OK, your patch removes implementations of '+', '-', '*' but defaults in AIntervalCategory call qinterval from Interval. > > I did not check if roundUp and roundDown _always_ lead > > to correct result, but without them results are clearly > > incorrect. > > Yes. But roundUp and roundDown are implemented / used in Interval and there > is no default package for IntervalCategory. > > > So, most of operations in Interval should stay the same. > > Yes, when I first designed AIntervalCategory, I had in mind that the > semantics of Interval should not change. Of course, I could have made a > mistake, but then it would have been unintentional. > > Maybe I should come up with a number of tests? That is actually tricky. In case on Interval what matters are tiny 1 bit differences which occur in special cases. -- 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 fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/aFk_xtdN6t4aZZFx%40fricas.org.