7

What Every Programmer Should Know

 3 years ago
source link: https://www.mikeash.com/pyblog/what-every-programmer-should-know.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
What Every Programmer Should Know
mikeash.com: just this guy, you know?
What Every Programmer Should Know
by Mike Ash  

I have a short post for once! I happened to be talking about floating-point comparisons, and I trotted out my usual web page explaining all about floating-point calculation and error. And then I thought, this stuff is so essential, I ought to post it here as well. So without further ado: What Every Computer Scientist Should Know About Floating-Point Arithmetic. A bit heavy on the math, but if you've ever wondered why printing out 10.1 gives you 10.1000002, or why 1.0/10.0 * 5.0 != 1.0/2.0, this will explain it all.

No comments:

Did you enjoy this article? I'm selling whole books full of them! Volumes II and III are now out! They're available as ePub, PDF, print, and on iBooks and Kindle. Click here for more information.

No comments have been posted.

Comments RSS feed for this page

Add your thoughts, post a comment:

Spam and off-topic posts will be deleted without notice. Culprits may be publicly humiliated at my sole discretion.

Name:Web site:The Answer to the Ultimate Question of Life, the Universe, and Everything?Comment:Formatting: <i> <b> <blockquote> <code>. URLs are automatically hyperlinked.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK