From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andries E. Brouwer" Subject: Re: math_error.7 draft 3, for review Date: Mon, 21 Jul 2008 16:15:15 +0200 Message-ID: <20080721141514.GB11396@mette> References: <20080716213732.GA10011@ub> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-man-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Michael Kerrisk Cc: "Andries E. Brouwer" , aj-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org, linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Fabian Kreutz List-Id: linux-man@vger.kernel.org On Mon, Jul 21, 2008 at 01:36:52PM +0200, Michael Kerrisk wrote: > 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? Yes. These are different floating point values, and sometimes the difference is important. In cases of total loss of precision it is the only bit left. At a branch cut one has a discontinuity and for example the imaginary part of clog(0.0) will be 0 while the imaginary part of clog(-0.0) is pi*I. Andries -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html