1 year ago

#308532

test-img

pmor

ISO/IEC TR 18037 (fixed-point arithmetic): no signed zero?

In ISO/IEC TR 18037:2006(E) I don't see if there is a signed zero.

Consider this code:

int main(void)
{
    _Sat short _Fract x, y;
    x = 0.0078125HR;   // SFRACT_EPSILON
    y = x * x;         // 0.0HR
    y = -x * x;        // -0.0078125HR
}

Questions:

  1. If anyone knows: why there is no signed zero?
  2. If -x * x is -SFRACT_EPSILON, then why x * x is 0.0HR instead of SFRACT_EPSILON?

c

zero

fixed-point

0 Answers

Your Answer

Accepted video resources