Hello- to the keepers of the Sacred Source Code, in the course of developing some
displays I noticed that a PV which should never be < 0 had a persistent flickering minus
sign (-0.000)... the cause was traced to the implentation of ABS in the calc record, ie:
if (*ptop < 0.0) *ptop = - *ptop;
In my case, the CALC is "ABS(A*B)", and e.g. A=0 and B<0 results in ABS(-0), which does
not satisfy the if() in the code because -0 is NOT less than zero, so the sign is not flipped
back to positive.
Using fabs() instead fixes it (and probably also saves a branch).