Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Converting decimal to/from IEEE hex format

  • To: mathgroup at
  • Subject: [mg71206] Converting decimal to/from IEEE hex format
  • From: "Robert" <renenkel at>
  • 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

  • Prev by Date: Re: Mathematica 5.2 redraw errors with X and nvidia graphics card
  • Next by Date: Question Solve
  • Previous by thread: Matrix question
  • Next by thread: Re: Converting decimal to/from IEEE hex format