arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1310.8121math.NAcs.NA
收藏

浮点数的易用准确读写

Easy Accurate Reading and Writing of Floating-Point Numbers

Digilant

Aubrey Jaffer

AI总结:

本文提出简化转换十进制科学记数法与二进制IEEE 754双精度浮点数的算法,通过舍入整数商操作提升稳定性与效率,减少转换所需 mantissa 位数。

摘要:

本文介绍了将十进制科学记数法与二进制IEEE 754双精度浮点数相互转换的算法。通过使用舍入整数商操作,这些算法比之前发表的算法更简单。转换值在重复转换时保持稳定。与Java-1.8不同,生成的科学表示仅使用转换回原始二进制值所需的最小mantissa位数。

英文摘要:

Presented here are algorithms for converting between (decimal) scientific-notation and (binary) IEEE-754 double-precision floating-point numbers. By employing a rounding integer quotient operation these algorithms are much simpler than those previously published. The values are stable under repeated conversions between the formats. Unlike Java-1.8, the scientific representations generated use only the minimum number of mantissa digits needed to convert back to the original binary values.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑