[535] fminf(x,y) / fmaxf(x,y) corrupt result for equal non-zero parameters
fminf(x,y) / fmaxf(x,y) corrupted the result when x==y and x!=0.0 due to ANDing/ORRing a single precision register with the high word of a double precision register pair when fixing up signs for mixed +/- 0 parameters in an analogous fashion to fmax/fmin (which are correct).
Proposed replacement considers whether the sign bit of the result actually does need fixing up and sets it(for fminf) and clears it (for fmaxf) appropriately.
fmaxftest.txt compares the output of these functions with fmax/fmin, including sign bits. Compare with the buggy output shown by Ticket #535. I've also successfully run five million random numbers through both functions using a fixed build of SharedCLibrary.
- You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply