【发布时间】:2015-05-13 04:25:23
【问题描述】:
以下链接中提到了稳定的伪代码。 我想在 C++ 中实现它。我无法理解和执行这些 signof 和 exponentof 以及 mantissaof 操作。
how to convert double between host and network byte order?
void htond (const double hostDouble, uint8_t result[8])
{
result[0] = signOf(hostDouble);
result[1] = exponentOf(hostDouble);
result[2..7] = mantissaOf(hostDouble);
}
【问题讨论】: