Displaying 1 result from an estimated 1 matches for "dest4".
Did you mean:
dest
2011 Aug 10
1
Floats in Microsoft Basic format
...eed to convert a floating point value from Microsoft Basic format to IEEE
format.
There's a simple way to achieve this in R or I have to write my own
function?
(e.g. convert the C code below)
thanks
t
#include <string.h> /* for strncpy */
int _fmsbintoieee(float *src4, float *dest4)
{
unsigned char *msbin = (unsigned char *)src4;
unsigned char *ieee = (unsigned char *)dest4;
unsigned char sign = 0x00;
unsigned char ieee_exp = 0x00;
int i;
/* MS Binary Format */
/* byte order => m3 | m2 | m1 | exponent */...