Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] How to obtain a 64-bit IEEE754 representation of a decimal number

From: lmecir::mbox::vol::cz at: 2-Feb-2004 13:59

convert: func [ x /local y ] [ y: make struct! compose/deep [x [(type?/word x)]] reduce [x] third y ] Usage: convert 0.2 ; == #{9A9999999999C93F} this is a big endian form of the number (in Windows). If you prefer a little endian form, which is more (human) readable, use: head reverse convert 0.2 ; == #{3FC999999999999A} -Ladislav