在以下链接中提到了稳定的伪代码。我想在 C++ 中实现它。我无法理解和执行这些 signof 和 exponentof 以及 mantissaof 操作。
void htond (const double hostDouble, uint8_t result[8])
{
result[0] = signOf(hostDouble);
result[1] = exponentOf(hostDouble);
result[2..7] = mantissaOf(hostDouble);
}