TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A bunch of floating point errors

2 点作者 j2d2j2d2大约 14 年前

2 条评论

pascal_cuoq大约 14 年前
double x0 = 0x1.0000000000001p0; double y = 0x1p-53 * (1. - 0x1p-11); double z1 = x0 + y;<p>or other examples taken from <a href="http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floating-point-article.pdf" rel="nofollow">http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floatin...</a> would have been more interesting than 0.1 + 0.2, for which every tested language seem to compute the proper IEEE 754 double precision result.
bluedanieru大约 14 年前
Au contraire, there are no errors here.