[ADOL-C] Arithmetic Exception

Kudruss mkudruss at ix.urz.uni-heidelberg.de
Tue Nov 2 06:15:41 EDT 2010


Hey there,
I try to use ADOLC for OED in robotics, but using code generated with
adoubles cause an Arithmetic Exception. With normal doubles the program
works fine. Problem occurs in using the implemented atan2 function. 
Greetings,
Manuel Kudruss

Here's a small example where the error appears.

#include <adolc.h>
#include <fenv.h>

using namespace std;

#define DOUBLE adouble
//#define DOUBLE double

int main( void )
{
    feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
   	
    DOUBLE fCosPitch = -999.999;;
    DOUBLE m_aclRot = 0.0;
    DOUBLE clRPY;


    fCosPitch = sqrt(1. - sqrt(m_aclRot));
    clRPY = atan2(-m_aclRot, fCosPitch);
    
    return 0;

}





More information about the ADOL-C mailing list