| delorie.com/archives/browse.cgi | search |
| Date: | Tue, 18 Mar 2003 14:31:11 +0200 |
| From: | "Eli Zaretskii" <eliz AT elta DOT co DOT il> |
| Sender: | halo1 AT zahav DOT net DOT il |
| To: | djgpp-workers AT delorie DOT com |
| Message-Id: | <7263-Tue18Mar2003143111+0200-eliz@elta.co.il> |
| X-Mailer: | emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 |
| In-reply-to: | <200303181210.NAA03843@lws256.lu.erisoft.se> (message from Martin |
| Stromberg on Tue, 18 Mar 2003 13:10:15 +0100 (MET)) | |
| Subject: | Re: isnan and isinf |
| References: | <200303181210 DOT NAA03843 AT lws256 DOT lu DOT erisoft DOT se> |
| Reply-To: | djgpp-workers AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp-workers AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
> From: Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se>
> Date: Tue, 18 Mar 2003 13:10:15 +0100 (MET)
>
> But how would you access the bits directly?
Just do it:
double foo;
...
if ((foo & 0x7ffffffffffffffffL) != 0)
do_something;
I think this should DTRT (GCC will generate the necessary machine
code). If not, you could say something like
if (((*(long long *)&foo) & 0x7ffffffffffffffffL) != 0)
instead.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |