TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Online IEEE 754 playground

20 pointsby delanalmost 10 years ago

3 comments

Sanddanceralmost 10 years ago
This isn&#x27;t IEEE 754 floating point, but rather Javascript floats. For example, it gets (n!=0)&#x2F;0 wrong by using the javascript NaN value instead of the IEEE 754 value of +-Infinity. For a playground like this, I think that it would be interesting to show how IEEE 754 and Javascript differ -- division by zero, the max function, etc.<p>Edit: I had misremembered one of the differences. Javascript does get division by zero correct. The biggest differences are in the comparisons, Javascript propagates NaNs more frequently.
评论 #9849037 未加载
recursivealmost 10 years ago
Lack of understanding of floating point numbers is one of the most persistent and pervasive problems in programming. Just look at Stack Overflow on any given day. I&#x27;ve also helped co-workers more times than I can count on problems that stem from not understanding how floats work.
评论 #9849013 未加载
评论 #9848821 未加载
kukxalmost 10 years ago
If someone doesn&#x27;t know what IEEE 754 is - it&#x27;s &quot;a technical standard for floating-point computation&quot; <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IEEE_floating_point" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IEEE_floating_point</a>