A simple float cv::Mat like this
cv::Mat _1 = (cv::Mat_<float>(5, 5) << 1, 4, 6, 4, 1, 4, 16, 24, 16, 4, 6, 24, 36, 24, 6, 4, 16, 24, 16, 4, 1, 4, 6, 4, 1);
has that output after using cv::pow(_1,2,_1)
[1, 16, 36, 16, 1;
16, 256, 576, 256, 16;
36, 576, 1296, 576, 36;
16, 256, 576, 256, 16;
1, 16, 36, 16, 1]
which is ok, but when using cv::cuda::pow(_1,2,_1)
the output is
[1, 16, 35.999996, 16, 1;
16, 256, 575.99994, 256, 16;
35.999996, 575.99994, 1295.9996, 575.99994, 35.999996;
16, 256, 575.99994, 256, 16;
1, 16, 35.999996, 16, 1]
What's the reason for that strange output ? also that problem is solved when using double instead of float but I want to know the reason of that