Re: math_error.7 draft 3, for review

Michael Kerrisk
2008-07-21T11:36:52Z

Hi Andries,

Reading the POSIX.1 specs of various functions, I see that sometimes
they talk of the return value of a function as being +0, sometimes
+-0, and sometimes -0. Does one need to care about this? (e.g., in
updating them man-pages, I'm inclined to group the 0 cases togetehr,
where possible). If one does need to care, then could you explain to
me why? Are there cases where one gets bitten by not caring? (I've
had a browse through the C standard, but I'm not sure that I am yet
any the wiser.)

Hmmm -- just now, I find the Wikipedia article:
http://en.wikipedia.org/wiki/%E2%88%920_(number). So, are these the
only cases that matter (quoting test from wp):

* using the copysign() function, which is defined by IEEE 754 to copy
the sign of the zero, to some non-zero number
* dividing the number into a positive number—the resulting Infinity
will reflect the sign of the zero.

?

It starts to sound like I should care about postive and negative zero
when rewriting the man pages, or?