cvFloor / cvCeil may fails on integer input (Bug #2629)


Added by dshor dshor about 12 years ago. Updated about 12 years ago.


Status:Done Start date:2012-12-14
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:core
Target version:2.4.4
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

Description

diff.f may be -0.f and testing diff.i < 0 is wrong.
this is not easy to reproduce, but obviously wrong.

and current complication defenition is not using SSE2 option on WIN32 for some reason

...
#else
int i = cvRound(value);
- Cv32suf diff;
- diff.f = (float)(i - value);
- return i + (diff.i < 0);
+ double diff;
+ diff = (i - value);
+ return i + (diff < 0);
#endif


Associated revisions

Revision 146ca61a
Added by Vadim Pisarevsky about 12 years ago

added tests for #1373, #2629, #2719; fixed another bug in determinant(Matx<T,n,n>)

Revision da58425f
Added by Roman Donchenko almost 11 years ago

Merge pull request #2629 from maksqwe:unused_fix

History

Updated by Alexander Shishkov about 12 years ago

  • Category set to core
  • Priority changed from High to Normal
  • Assignee set to Vadim Pisarevsky

Updated by Vadim Pisarevsky about 12 years ago

  • Affected version set to 2.4.3
  • Target version deleted ()

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee set to Vadim Pisarevsky

Updated by Andrey Kamaev about 12 years ago

Fix is pushed to 2.4

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF