Converting decimal to/from IEEE hex format
- To: mathgroup at smc.vnet.net
- Subject: [mg71206] Converting decimal to/from IEEE hex format
- From: "Robert" <renenkel at hotmail.com>
- Date: Fri, 10 Nov 2006 06:38:11 -0500 (EST)
Can anyone tell me how to convert a number to/from the corresponding IEEE hex floating-point representation in either 32 or 64 bits in Mathematica? For example, I would want to convert 1.0 into 3F800000 (32-bit) or 3FF0000000000000 (64-bit), and vice-versa. (When converting from decimal to hex, if the number is not exactly representable, I would want the nearest floating-point number.) Thanks, Robert
- Follow-Ups:
- Re: Converting decimal to/from IEEE hex format
- From: Carl Woll <carlw@wolfram.com>
- Re: Converting decimal to/from IEEE hex format