|
|
nono 0.1.3
// 何もかも分かった上で暫定
extern float u2f(uint32 u);
extern double u2d(uint64 u);
extern uint32 f2u(float v);
extern uint64 d2u(double v);
float
u2f(uint32 u)
{
float v;
memcpy(&v, &u, 4);
return v;
}
double
u2d(uint64 u)
{
double v;
memcpy(&v, &u, 8);
return v;
}
uint32
f2u(float v)
{
uint32 u;
memcpy(&u, &v, 4);
return u;
}
uint64
d2u(double v)
{
uint64 u;
memcpy(&u, &v, 8);
return u;
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.