MathGroup Archive 2006

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

Search the Archive

Converting decimal to/from IEEE hex format


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