### wrong results from culaSgesv

Posted:

**Sun Aug 03, 2014 3:21 pm**Hi

I get wrong results solving for x in Ax=b using culaSgesv.

My test inputs are:

float A[] = {1.00296,-0.00147947,0,-0.00591787,1.01184,-0.00591787,0,-0.0133152,1.02663};

float b[] = {0,0,408.035};

int* rowPos = new int[3];

culaSgesv(3, 1, A, 3, rowPos, b, 3);

Using R and my own serial version of gauss solver, I get:

b=[3.429614e-03, 2.324999e+00, 3.975258e+02]

While culaSgesv gives me b=[0.030863, 5.23065, 397.481]

Is there a bug in the implementation? I'm using student version of release R17. The error seems too big for float/double discrepancy.

Thanks

Asim

I get wrong results solving for x in Ax=b using culaSgesv.

My test inputs are:

float A[] = {1.00296,-0.00147947,0,-0.00591787,1.01184,-0.00591787,0,-0.0133152,1.02663};

float b[] = {0,0,408.035};

int* rowPos = new int[3];

culaSgesv(3, 1, A, 3, rowPos, b, 3);

Using R and my own serial version of gauss solver, I get:

b=[3.429614e-03, 2.324999e+00, 3.975258e+02]

While culaSgesv gives me b=[0.030863, 5.23065, 397.481]

Is there a bug in the implementation? I'm using student version of release R17. The error seems too big for float/double discrepancy.

Thanks

Asim