We use cookies, including third-party cookies from Google to serve personalized ads through AdSense, to operate this site and understand how it is used. By continuing to browse, you accept this use. See our Privacy Policy and Terms of Use for details, including how to opt out of personalized advertising.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More: Analytics
    Cut-paper editorial diagram of public web pages flowing through a terracotta volume meter into a BI budget panel.
    The Line Item Behind Public Web Data in BI: Proxy Bandwidth
    12 Min Read
    Flat editorial illustration: The article is about joining public web signals with internal business metrics so BI teams can inter
    Alternative Data in BI: Bringing Public Web Data Into Your Dashboards
    23 Min Read
    Flat editorial illustration: The article is about automating the collection, preparation, and delivery of marketing data across p
    From Data to Dashboards: 5 Marketing Reporting Automation Software Picks
    12 Min Read
    Flat editorial illustration: The article contrasts passive follower totals with a behavioral path from attention and trust to cli
    Creator Analytics Beyond Follower Count: Seven Metrics That Measure Audience Behavior
    11 Min Read
    Flat editorial illustration: The article connects AI and marketing analytics with managerial judgment grounded in consumer behavi
    How an Online MBA in Marketing Connects AI and Data Analytics
    11 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-25 SmartData Collective. All Rights Reserved.
Reading: Floating-point errors, explained
Share
Notification
Font ResizerAa
SmartData CollectiveSmartData Collective
Font ResizerAa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Uncategorized > Floating-point errors, explained
Uncategorized

Floating-point errors, explained

DavidMSmith
DavidMSmith
3 Min Read
Floating-point errors, explained
Illustration generated with FLUX.2 [klein 4B] via Cloudflare Workers AI.
SHARE

Back in March, we looked at the reasons behind apparent arithmetic “mistakes” that can occur in software programs like R that use floating-point arithmetic, like this:    

> 1.0 – 0.9 – 0.1
[1] -2.775558e-17

Of course, the answer should be zero, but it’s not, not exactly anyway. That example (which I wish I’d thought of myself at the time) comes from an well-written and informative article published in PC Plus and available online at techradar.com. In simple, non-technical terms, it explains why such floating-point errors occur. It also gives some examples of the consequences of not anticipating such errors, like the Ariane 5 rocket that self-destructed 5 seconds after launch, or the Patriot missile that failed to target an Iraqi Scud missile that killed 28 people. 

More Read

A Small Experiment with Twitter's Language Detection Algorithm
A Small Experiment with Twitter’s Language Detection Algorithm
Plumbing the Salesforce Clouds is Your Business
10 Characteristics of a Social Enteprise
Cruiser and PhoTable: Limited by your imagination
“Why taking a few punches on the financial crisis just might save IT” by Patrick Gray on TechRepublic

These horror stories explain why good programmers should always be aware of the pitfalls of using floating-point arithmetic and to program defensively to avoid them. (I gave some tips for R in that article from March.) It’s a great article to send next time someone asks you why their code isn’t giving a exactly the right result when they think it should.

TechRadar.com: Why computers suck at maths


Share This Article
Facebook Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

Cut-paper editorial diagram of service callback tickets moving through a terracotta sorter into rising scorecard bars.
Why Your Redo Jobs Hold the Best Data in Your Franchise
Big Data Data Collection Exclusive
Cut-paper editorial diagram of public web pages flowing through a terracotta volume meter into a BI budget panel.
The Line Item Behind Public Web Data in BI: Proxy Bandwidth
Big Data Business Intelligence Exclusive Web Analytics
Cut-paper editorial diagram of raw business invoices moving through a terracotta data pipeline into structured analytics.
Where Intelligent Automation & Data Pipelines Pay Off First
Artificial Intelligence Big Data
Layered cream, terracotta, and charcoal paper contract sheets flowing through a security shield into a verified server rack
What Should a Managed IT Service Agreement Include?
IT

Stay Connected

1.2KFollowersLike
33.7KFollowersFollow
222FollowersPin

You Might also Like

A traditional approach to risk management
Uncategorized

A traditional approach to risk management

5 Min Read
My Thoughts on the “Washington’s Tech Titans” List
Uncategorized

My Thoughts on the “Washington’s Tech Titans” List

5 Min Read
Translating the Geek Speak: Is It Time to Dump Your IT Company?
Uncategorized

Translating the Geek Speak: Is It Time to Dump Your IT Company?

5 Min Read
ResponseTek Makes Customer Experience Management Simple and Sophisticated
Uncategorized

ResponseTek Makes Customer Experience Management Simple and Sophisticated

7 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

How To Get An Award Winning Giveaway Bot
How To Get An Award Winning Giveaway Bot
Big Data Chatbots Exclusive
ai chatbot
How AI Website Chatbots Improve Customer Support and Lead Generation
Chatbots Exclusive

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-26 SmartData Collective. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?