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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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) {
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1