The patch below fixes non-monotonicity of interval difference.
Original code changes 'a - a' to 0, but this is wrong according
to rules of interval arithmetic. I think we should fix this
regardless of problem with specifying apropriate category.
I this causes no problems for testsuite.
BTW. I also tried to make Interval into CommutativeRing
(currently it is claimed to be GcdDomain). Surprisingly,
algebra builds fine, but there are runtime failures
Index: src/algebra/interval.spad
===================================================================
--- src/algebra/interval.spad (revision 1784)
+++ src/algebra/interval.spad (working copy)
@@ -146,7 +146,7 @@
_- (a : %, b : %) : % ==
if zero?(a) then return(-b) else if zero?(b) then return(a)
- if a = b then 0 else qinterval(inf(a) - sup(b), sup(a) - inf(b))
+ qinterval(inf(a) - sup(b), sup(a) - inf(b))
_* (a : %, b : %) : % ==
--
Waldek Hebisch
[email protected]
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.