delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/04/04:47:13

Date: Sun, 4 Feb 1996 11:43:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Erik Max Francis <max AT alcyone DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: binary representation of floats

On Fri, 2 Feb 1996, Erik Max Francis wrote:

> Eli Zaretskii wrote:
> 
> > Every book on Intel CPUs describes this.  To get a bit pattern of any
> > float or double variable, cast them to an unsigned int and use the usual
> > bit operations.  (In the case of double, you'll have to use long long.)
> 
> you need
> 
>     *(unsigned int *) &f.

Right, that's what I had in mind (but didn't say).  Thanks for clarifying 
this. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019