i have migrated matlab functions to cuda via mexfiles, but have the current precision problem.
The line itself that is causing the problem is the following:
matA[idx]=exp(log(matA[idx]) / (1- vector[idx+1] / vector[idx] ) );
Consecutive positions of vector are almost equal, thus i get an almost divide by zero in de division of the log.
The rest of the functions perform perfectly, as they have no ulp error, but in double precision both log and exp functions suffer from a ulp error of 1 (full range).
This lack of precision is inadmissable for my calculations, so i would like to know:
Â¿IS THERE ANY WAY TO GET EXACT RESULTS WITH LOG AND EXP FUNCTIONS?I dont have any problems if it takes longer, but i need the precision.
Anyone who can help, PLEASE ANSWER.
Thanks to anyone in advance!!!