Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Possible bug in ipp rounding for p8 arch

zestony
Beginner
269 Views
I observe that tan/tanf when used after ceil/floor functions from ipp return erroneous results on windows machines with 45nm processors. Code snippet and build commands used attached below. The error disappears when I include instead of or when I link statically with libmmd or on machines with other processors. Any idea why this is happening and possible fixes?

Thanks
Jayanth


-------------
#include
#include
//#include
#include
#define MY_PI 3.141592653589793f

int main(int argc, char **argv)
{
float theta = MY_PI/( 3.0f);
float x=MY_PI;
float xi;

printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tanf(MY_PI/3.0f), tanf(2.0f*(MY_PI/3.0f)));
printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tan( (double)MY_PI/3.0f), tan((double)(2.0f*MY_PI/3.0f)));

ippsCeil_32f(&x, ξ, 1);
printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tanf(MY_PI/3.0f), tanf(2.0f*(MY_PI/3.0f)));
printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tan( (double)MY_PI/3.0f), tan((double)(2.0f*MY_PI/3.0f)));

ippsFloor_32f(&x, ξ, 1);
printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tanf(MY_PI/3.0f), tanf(2.0f*(MY_PI/3.0f)));
printf("tan(pi/3) = %.9f , tan(2pi/3) = %.9f ", tan( (double)MY_PI/3.0f), tan((double)(2.0f*MY_PI/3.0f)));
}

-----------------------


icl /c /I "C:Program FilesIntelIPP5.3.3.082ia32include" /Fo"Release/" /W3 /nologo /Gd TrialTan.cpp

xilink /OUT:"Release/TrialTan.exe" /nologo /LIBPATH:"C:Program FilesIntelIPP5.3.3.082ia32stublib" ippvm.lib /MANIFEST /MANIFESTFILE:"ReleaseTrialTan.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 ReleaseTrialTan.obj

mt /nologo /outputresource:"ReleaseTrialTan.exe;#1" -manifest ReleaseTrialTan.exe.intermediate.manifest

0 Kudos
1 Reply
Vladimir_Dudnik
Employee
269 Views

Hello,

we detected that issue also. It was fixed starting from IPP 6.0 beta.

Regards,
Vladimir

0 Kudos
Reply