accuracy AddProduct function?

accuracy AddProduct function?

dear all,

recently i experienced maybe accuracy problems when using ippsAddProduct_64f function to calculate the dot product of 2 vectors. please find an example in pseudo-code below:

2 input vectors:
v1: 0.9916417944, 0.0710609594, -0.1076888651
v2: 0.0010000000, 0.0010000000, -0.0010000000

**** method 1: ipps AddProduct ****
Ipp64f tmp_value1 = 0.0;
ippsAddProduct_64f(v1,v2,&tmp_value1, 3);

output: tmp_value1: 0.0009916418

**** method 2: ipp matrix library ****
Ipp64f tmp_value1 = 0.0;
Ipp32s stride_Ipp64f = sizeof(Ipp64f);
ippmDotProduct_vv_64f(v1, stride_Ipp64f, v2, stride_Ipp64f, &tmp_value1, 3);

output: tmp_value1: 0.0011703916

**** method 3: by hand ****
Ipp64f tmp_value1 = v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2];

output: tmp_value1: 0.0011703916

the correct value is delivered by method 2 and 3. now my question is, what did i do wrong or is this some kind of accuracy problem? has anyone experienced similar problems?

i am grateful for any hints or thoughts.

best regards,
markus

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Customer,

Thanks for reporting and we generated this issue in #441601 via Intel Premier Support, our support engineer will contact you for further assistance.

Thanks,
Ying

Leave a Comment

Please sign in to add a comment. Not a member? Join today