as long as the conversion you're after has an exact ieee representation,
i can't see how two compliant implementations could come up with
differing representations. (two different numbers can't have the same
ieee representation, except -0 and +0.) the conversion process doesn't
need any floating point itself and the only interpolation comes when
numbers don't have exact representations.
it didn't occur to me immediately after russ' post that what he said
was literally correct:
#include<u.h>
#include<libc.h>
#define Magici(x) (((uchar*)&magic)[7-(x)])
static double magic = 7.949928895127363e-275;
void
main(void)
{
uint sign, exp;
uvlong sig, *v;
v = (uvlong*)&magic;
sign = *v>>63;
exp = *v>>52;
sig = *v&~(4096-1LL<<52);
print("%b*%b*%ullx\n", sign, exp, sig);
print("%ullx\n", *v);
}
- erik