Hi, hope this isn't too specific and off topic. I was looking at the
Buffer.writeFloat example in the documentation: 
http://nodejs.org/api/buffer.html
. In the example, somehow doing writeFloatBE(0xcafebabe, 0) creates a
buffer that's <4f 4a fe bb>. I've looked at this page explaining the
binary layout of floats: http://kipirvine.com/asm/workbook/floating_tut.htm,
but it still doesn't make sense how this translation is working. For
the buffer, I'm getting 31 for the exponent (158 - 127) and 4914875
for the mantissa, which is different from 0xcafebabe = 3405691582.
Thanks for any help and clarification.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to