On 12/20/2010 08:44 AM, Bruno Haible wrote: > Regarding DEC Alpha platforms, I don't think they are 100% IEEE 754 + 854 > compliant, because the hardware designers took some shortcuts regarding > the exception handling, in order to implement the floating-point operations > in a single CPU cycle.
Another case of this is the intel compiler on Linux, if you don't use the -mieee-fp option (see my recent patches in November) - the truth is that full IEEE compliance is expensive, and lots of people take shortcuts unless you insist on compliance, so gnulib should tolerate shortcuts where it is easy enough to do and where the system wasn't trying to claim full compliance. > >>> - make little sense for 'ceil' from a mathematical point of view: >>> ceil is a monotonically increasing function but POSIX wants >>> ceil(-0.5) = 0.0 and ceil(-0.0) = -0.0, >> >> I'll raise that point with the Austin group. > > Given that the annex section F.9.6.1 in ISO C99 already specifies this > behaviour, I don't think the Austin group will deviate from that. You're right; in fact, Geoff Clare gave his reasoning for keeping the current behavior: https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=15141 > The behaviour sort of makes sense to me. It matches the equivalent > arithmetic operation. > > I.e. to obtain the integer value not less than -0.5 you add 0.5 to it, > and -0.5 + 0.5 is +0.0. Obtaining the integer value not less than -0.0 > is a no-op, so you get back exactly what you put in. > > The behaviour *is* monotonically increasing (because -0.0 is equal > in value to +0.0). -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature