Hello VBAers -
I built an Excel 2010 VBA application using the great routines sitting at:
http://www.tek-tips.com/faqs.cfm?fid=6404
These convert IEEE 32 bit hex values to/from single precison Excel numbers. I might be doing something wrong, but most times the Function i3efp(num_in) under FAQ Item # 4 works perfectly. When I say perfectly I mean it matches what I get from a nice on-line web<NOBR style="COLOR: #2b65b0" id=itxthook3w2nobr class="itxtrst itxtrstnobr itxthooknobr">based</NOBR> conversion utility at:
http://babbage.cs.qc.edu/IEEE-754/Decimal.html
I find i3efp() works great for passed in values like 30, 35.5, 45, 50, and 59.1234. However, I get a mismatch with the above web tool for numbers like 35.1 and 133. Then i3efp() fails for numbers like 32, 64, and 128.
When 32 comes in, the internal "e" becomes 132, and "f" becomes 0.
An "f" of zero bombs during an internal "Right()" call inside the function.
Am I doing something wrong? Anyone have a fix for the Function called i3efp( ) for the mismatches and/or downright failures?
I have put a demo spreadsheet on MediaFire, an Excel 2010 XLSM at
http://www.mediafire.com/?kq3v78ayyiaa124
Thanks in advance,
Viper
I built an Excel 2010 VBA application using the great routines sitting at:
http://www.tek-tips.com/faqs.cfm?fid=6404
These convert IEEE 32 bit hex values to/from single precison Excel numbers. I might be doing something wrong, but most times the Function i3efp(num_in) under FAQ Item # 4 works perfectly. When I say perfectly I mean it matches what I get from a nice on-line web<NOBR style="COLOR: #2b65b0" id=itxthook3w2nobr class="itxtrst itxtrstnobr itxthooknobr">based</NOBR> conversion utility at:
http://babbage.cs.qc.edu/IEEE-754/Decimal.html
I find i3efp() works great for passed in values like 30, 35.5, 45, 50, and 59.1234. However, I get a mismatch with the above web tool for numbers like 35.1 and 133. Then i3efp() fails for numbers like 32, 64, and 128.
When 32 comes in, the internal "e" becomes 132, and "f" becomes 0.
An "f" of zero bombs during an internal "Right()" call inside the function.
Am I doing something wrong? Anyone have a fix for the Function called i3efp( ) for the mismatches and/or downright failures?
I have put a demo spreadsheet on MediaFire, an Excel 2010 XLSM at
http://www.mediafire.com/?kq3v78ayyiaa124
Thanks in advance,
Viper
Last edited: