bugC++ Affine Arithmetic library - Bugs: bug #26340, absolute value calculation for...


bug #26340: absolute value calculation for affine intervals is incorrect

Submitted by:  None
Submitted on:  Fri 24 Apr 2009 09:12:32 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 08 Apr 2010 11:52:17 AM UTC, comment #2:

Ops -- Stolfi's implementation does have abs! But it's completely different...

Jeronimo Pellegrini <pellegrini>
Thu 08 Apr 2010 11:45:03 AM UTC, comment #1:

How exactly is abs defined (what should be the output of abs(x) when x straddles zero)? I didn't find a description of it in Affine Arithmetic literature, and other implementations (Like Stolfi's and ASOL -- http://reliablecomputing.eu/software.html) do not implement abs.

Jeronimo Pellegrini <pellegrini>
Fri 24 Apr 2009 09:12:32 PM UTC, original submission:

The absolute value calculation in aa_aafapprox.cpp for affine intervals doesn't work. It is:

AAF abs(const AAF & P) {
return -P;
if(P.straddles_zero()) {
AAF Temp(P);
Temp.cvalue = fabs(Temp.cvalue)/2;
Temp.special = P.special;

for (unsigned i=0; i<P.length; i++)
return Temp;
return P;

But the inverval can only be reduced by 1/2 if it is centered on zero, and even then the center value needs to be shifted. E.g. for abs(x+y) with x in [-1,1] and y in [0,2] the above gives an affine approx. corresponding to an interval [-0.5,1.5], when the true interval is [0,3]...

Moshe Looks (moshe@metacog.org)



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pellegrini (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3