Path: utzoo!utgpu!water!watmath!clyde!rutgers!umd5!umbc3!alex From: alex@umbc3.UMD.EDU (Alex S. Crain) Newsgroups: comp.unix.wizards Subject: Re: casting to float without converting to float? Message-ID: <686@umbc3.UMD.EDU> Date: 8 Jan 88 00:26:48 GMT References: <11171@brl-adm.ARPA> Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain) Organization: University of Maryland, Baltimore County Lines: 15 In article <11171@brl-adm.ARPA> weiser.pa@Xerox.COM writes: >I have the following problem: I have a value which I happen to know has the >proper bits to represent a floating point number (either 32 or 64). However, it >is of type int. I would now like to tell the C compiler to treat this thing as >a float. union { float f; int i; } foo; foo.i = int value foo.f = float value -- :alex. alex@umbc3.umd.edu