How to convert float to bytes in little-endian format in OCaml? -


how can convert float bytes in little-endian format?

like

5.05 -> \x33\x33\x33\x33\x33\x33\x14\x40 

like this:

# let v = int64.bits_of_float 5.05 in   = 0 7     printf.printf "%lx " (int64.logand 255l (int64.shift_right v (i*8))) ;   done    ;; 33 33 33 33 33 33 14 40 - : unit = () 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -