Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2003 06:25:21 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        standards@FreeBSD.ORG
Subject:   Re: signbit() implementation question
Message-ID:  <20030211055050.Q2485-100000@gamplex.bde.org>
In-Reply-To: <20030210123510.B40864@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Feb 2003, Mike Barcroft wrote:

> I'm wondering if any casts from float->double or long double->double
> will cause the sign-bit to change.  In my implementation I just have
> the macro pass its argument to a function that takes a double for its
> argument.  In the tests I've done the sign-bit never changes with
> these casts, but I don't know if this is guaranteed to work for all
> values or whether this is completely portable.

Preserving the sign bit in conversions and rounding, etc. is required
by at least ieee854 (section 6.3), so I think all reasonable hardware
preserves it.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030211055050.Q2485-100000>