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

 
 

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

Submitter:  None
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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) {
    if(P.strictly_neg())
        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++)
            Temp.coefficients[i]=(Temp.coefficients[i])/2;
        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]...

Cheers,
Moshe Looks (moshe@metacog.org)

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code