mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
core: follow IEEE 754 rules for floating-point division
This commit is contained in:
@@ -415,8 +415,13 @@ The function cv::divide divides one array by another:
|
||||
or a scalar by an array when there is no src1 :
|
||||
\f[\texttt{dst(I) = saturate(scale/src2(I))}\f]
|
||||
|
||||
When src2(I) is zero, dst(I) will also be zero. Different channels of
|
||||
multi-channel arrays are processed independently.
|
||||
Different channels of multi-channel arrays are processed independently.
|
||||
|
||||
For integer types when src2(I) is zero, dst(I) will also be zero.
|
||||
|
||||
@note In case of floating point data there is no special defined behavior for zero src2(I) values.
|
||||
Regular floating-point division is used.
|
||||
Expect correct IEEE-754 behaviour for floating-point data (with NaN, Inf result values).
|
||||
|
||||
@note Saturation is not applied when the output array has the depth CV_32S. You may even get
|
||||
result of an incorrect sign in the case of overflow.
|
||||
|
||||
Reference in New Issue
Block a user